Created attachment 38430 [details] Verilog MIME type I use both Verilog and SystemVerilog languages on a day-to-day basis and have recently submitted language definition files for both (see https://bugzilla.gnome.org/show_bug.cgi?id=628246). However, MIME types do not currently exist for either language, hence the language definition files are of only limited use. As such I would like to submit MIME definitions for both languages (see attachments). These MIME types are for three file types - Verilog source files (verilog has no concept of explicit header files) and SystemVerilog source/header files. Please consider these additions for inclusion in the repository.
Created attachment 38431 [details] SystemVerilog header MIME type.
Created attachment 38432 [details] SystemVerilog source code MIME type.
Created attachment 38433 [details] Verilog MIME type. Fixed bug: mime-type= -> mime-type type=
Created attachment 38434 [details] SystemVerilog header MIME type. Fixed bug: mime-type= -> mime-type type=
Created attachment 38435 [details] SystemVerilog source code MIME type. Fixed bug: mime-type= -> mime-type type=
All files are based on freedesktop.org.xml on my local machine - specifically the C++ section.
See http://cgit.freedesktop.org/xdg/shared-mime-info/tree/HACKING#n31 for how the patches should be constructed.
I couldn't see any obvious instructions on that link for actually submitting new MIME types. I checked out the head from git and read README and attempted to follow it, but it contains errors - for example, there is no configure script that the README tells the user to execute. I attempted to run the autogen.sh script, but that also failed: "./autogen.sh: 27: aclocal: not found" Please let me know which file you'd like me to edit.
Not to worry - just spotted it.
Just to check, should I edit freedesktop.org.xml.in and send you a patch?
Yes, in a git formatted patch, and with test cases in the patch as well.
Created attachment 38437 [details] [review] Git patch of updates. Changes: * Added SystemVerilog example file: tests/test.sv * Changed Verilog and VHDL comments from "document" to "source code". * Added SystemVerilog header/source MIME types. Hopefully this is in the correct format.
Review of attachment 38437 [details] [review]: Split the subject line, it's 72 chars max. You also didn't add the new file to the test suite. ::: freedesktop.org.xml.in @@ +4406,3 @@ + <mime-type type="text/x-svhdr"> + <_comment>SystemVerilog header</_comment> + <sub-class-of type="text/plain"/> why no sub-class-of text/x-verilog? @@ +4411,3 @@ + <mime-type type="text/x-svsrc"> + <_comment>SystemVerilog source code</_comment> + <sub-class-of type="text/plain"/> same here
> Split the subject line, it's 72 chars max. Ok, I'll try again. > You also didn't add the new file to the test suite. How do I add files to the testsuite? I couldn't see how to check out "xdgmime" that the "HACKING" file talks about - there is no repository URL or check-out instructions. > why no sub-class-of text/x-verilog? I'm not entirely sure of the purpose of sub-classes in this context. It should be noted that SystemVerilog is a newer language than Verilog and is a strict superset - does this mean it should be a sub-class? The changes I'm trying to make seem trivial to me, but the process of making the changes is far from painless and straight-forward. Would it be acceptable for you to make these changes locally? I appreciate that you are probably busy, but it might be easier for you to make the minor edits than to support me in doing so.
Created attachment 38438 [details] Patch to add SystemVerilog header/source MIME types. BCJ: I've made SystemVerilog a sub-class of x-verilog, shortened the comment, added test files and updated the test list. Hopefully this should now meet your check-in criteria. Please let me know.
Just noticed that the list file wasn't added to that patch. Git is really starting to wind me up now. I'll try again...
Created attachment 38441 [details] [review] SystemVerilog header/source MIME type. I think this patch should be ok now. Please review for inclusion. Many thanks.
Please let me know if there's anything else I need to do to get this patch accepted.
(In reply to comment #14) > > Split the subject line, it's 72 chars max. > > Ok, I'll try again. > > > > You also didn't add the new file to the test suite. > > How do I add files to the testsuite? I couldn't see how to check out "xdgmime" > that the "HACKING" file talks about - there is no repository URL or check-out > instructions. It's in the same repository as shared-mime-info. I added this to the HACKING file. > > why no sub-class-of text/x-verilog? > > I'm not entirely sure of the purpose of sub-classes in this context. It should > be noted that SystemVerilog is a newer language than Verilog and is a strict > superset - does this mean it should be a sub-class? Probably not then. > The changes I'm trying to make seem trivial to me, but the process of making > the changes is far from painless and straight-forward. Would it be acceptable > for you to make these changes locally? I appreciate that you are probably > busy, but it might be easier for you to make the minor edits than to support me > in doing so. No, sorry, I don't have time to massage patches into shape.
I fixed the typo in the test/list file that made it expect text/x-svscr instead of text/x-svsrc. I also fixed the e-mail address in your patch. You might want to configure your git profile correctly if you're going to send more patches. See: http://live.gnome.org/Git/Developers#Setting_up_Git I also removed "BCJ" from the commit title, and made sure the subject stayed under 72 characters. commit 4272b8a01ae513fc67833163507bd8b7e6f15362 Author: Ben James <something_for_the_pain@hotmail.com> Date: Sat Sep 4 17:38:32 2010 +0100 Add SystemVerilog header/source mime and tests Also changed Verilog and VHDL from "document" to "source code" https://bugs.freedesktop.org/show_bug.cgi?id=30012
Many thanks for accepting the patch. Apologies for the errors. Now I just need to wait for this to filter down to my distro...
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.