#16055: TeXworks -- TeX previewer for Mac OS X -- uses the Qt4 GUI framework --------------------------------------+------------------------------------- Reporter: jens.traube@t-online.de | Owner: macports-tickets@lists.macosforge.org Type: enhancement | Status: new Priority: Normal | Milestone: Port Submissions Component: ports | Version: 1.6.0 Resolution: | Keywords: tex, latex, editor, qt4 --------------------------------------+------------------------------------- Comment (by jens.traube@t-online.de): Thank you for your interest in reviewing my port file. To your question about Ticket #16056: You are right, Ticket #16055 depends on Ticket #16056. The current port file of poppler does disable the build of the Qt4 bindings. Also, there are a lot of dependencies unnecessary for TeXworks. I attached a pdf file, which shows you the port dependencies of poppler without any variants and the different variants I propose. Now to your questions about my portfile of TeXworks (I attached a revised portfile "Portfile_v2") == (1) Why is the version empty? == In the subversion repository there still is no release branch. The "TeXworks" project is still in it's infancy, Jonathan Kew call it a pre- release version. As I know, he first presented it on a conference in Bachotek, Poland, (April 30 to May 4, 2008 -- multimedia recordings of the talks: [http://www.river-valley.tv/conferences/bachotex2008/]). I think, it would be to early to select a specific subversion revision number. Therefore, I suggest a "dynamic" version number: It consists of the date of the last commit and the number of that revision (HEAD). If you leave the variable "svn.tag" empty, you get the latest revision out of the subversion repository (revision "HEAD"). For instance, on my computer: {{{ $ port installed TeXworks The following ports are currently installed: TeXworks @20080720_105_0 (active) $ }}} TeXworks @DateOfLastCommit_NumberOfLastSVNRevision_NumberOfPortfileRevision Perhaps my port should be named "TeXworks-devel" ? == (2) revision (of portfile) should be a positive integer number == I corrected my mistake. See also (5) "What is the purpose of the post- fetch phase?" == (3) The homepage should be only one URL == Unil now, I did not know of an option "gohome", because in the man page of "port" it is not mentioned. I corrected my mistake and put the second web address into the long description. == (4) svn arguments == The synopsis of the svn checkout command is: svn checkout URL[@REV]... [PATH] The manual of svn tells that, if "PATH" is omitted, the basename of the URL will be used as the destination. The URL of TeXworks is: svn.url http://texworks.googlecode.com/svn/trunk/ Therefore, the svn command would create a directory named "trunk". This is ok, and "svn.post_args-append" is really not necessary. But the variable "worksrcdir" must be set to this name: "trunk". The default value of variable "worksrcdir" is ${distname}, which is undefined with a svn fetch, I think. Also "svn.pre_args-append" is not necessary, but in the debug mode of macports the checkout procedure echoes all transmitted file names to the standard output. == (5) What is the purpose of the post-fetch phase? == The purpose is to make the missing value of variable "version". It is the "dynamic" version number of TeXworks, about what I told you under (1) "Why is the version empty?". The first line is to get the info about the working copy from the subversion repository, formatted in xml. The second and third line parses this text for subversion revision number and the date of last commit. The fourth line makes the value of variable "version". MacPorts appends the svn revision. During this writing, I discovered an error: I named the variable for the subversion revision "revision", but this name has already been given for the variable, which takes the revision number of the portfile. == (6) Don't use `cd` in the Portfile == But it is necessary to change to the directory ${worksrcpath}, what else can I do? I made the following test in "post-patch": {{{ puts [pwd] cd ${worksrcpath} puts [pwd] }}} The first "puts" command outputs the path to the portfile of port "hunspell", one of the needed ports for TeXworks. == (7) Is this code for determining MACOSX_DEPLOYMENT_TARGET really needed? == Once again, I made a test in "post-patch": {{{ puts "----------------------------------" puts [option {macosx_deployment_target}] puts "----------------------------------" }}} It outputs nothing, is there something wrong with my test? == (8) Wouldn't it be easier to use a patch and a few reinplaces instead of this long post-patch phase? == I am not sure about that. My first attempt was to provide a patch file, but then I have doubts about this approach. The file "TeXworks.pro" is subject to changes. Until now, there is no certain release of TeXworks, and therefore no binding of source release version and corresponding patch files. == (9) There should be no need to use system to copy the TexWorks.app, you can use `file copy` == You are right, I edited it. == (10) Please file a separate ticket for the wrong paths in the pkg- config files for qt4-mac as this needs to be fixed. Would be good to add a ticket number for reference so this workaround can be removed once it is fixed. == See Ticket #16120 -- Ticket URL: <http://trac.macports.org/ticket/16055#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS