Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#23634 closed submission (fixed)

NEW: aap

Reported by: mail_ben_schmidt@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: aap

Description

Aap isn't used for much, but it is used. I use it for keeping my vim runtime files up-to-date. It's easier to install if it has a port! :-)

Attachments (3)

patch-destroot.diff (4.7 KB) - added by mail_ben_schmidt@… 15 years ago.
Portfile (1.4 KB) - added by mail_ben_schmidt@… 14 years ago.
New version to avoid hard coding /opt/local
patch-python26.diff (344 bytes) - added by mail_ben_schmidt@… 14 years ago.
New version to avoid hard coding /opt/local

Download all attachments as: .zip

Change History (10)

Changed 15 years ago by mail_ben_schmidt@…

Attachment: patch-destroot.diff added

comment:1 Changed 15 years ago by mail_ben_schmidt@…

Cc: mail_ben_schmidt@… added

Cc Me!

comment:2 Changed 14 years ago by jmroot (Joshua Root)

Cc: mail_ben_schmidt@… removed
Port: aap added
Summary: aapNEW: aap
Version: 1.8.2

You are hardcoding /opt/local in the patch. See PortfileRecipes for how to avoid that.

Changed 14 years ago by mail_ben_schmidt@…

Attachment: Portfile added

New version to avoid hard coding /opt/local

Changed 14 years ago by mail_ben_schmidt@…

Attachment: patch-python26.diff added

New version to avoid hard coding /opt/local

comment:3 Changed 14 years ago by mail_ben_schmidt@…

OK! I've updated it. Tests out OK, and no more nasty hard coding! Thanks for the tip. I've also changed revision number to zero in line with advice I got from another ticket, though wasn't 100% sure whether I should do that or whether I should be bumping it up. It's a new revision, but it's not 'in the wild' as it were, since it hasn't been added to MacPorts officially yet. Let me know if I've done it right or wrong.

comment:4 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to ryandesign@…
Status: newassigned

comment:5 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

Thanks, added aap in r72433 with these changes:

  • some whitespace changes and reformatting
  • obfuscated your email address in the maintainers line
  • added license line
  • added "supported_archs noarch" line since this port does not install any object files
  • changed the #! line in aap (patch-python26.diff) to not use "env" anymore since we're now specifying the complete path to the program
  • removed slash before $PREFIX in patch-destroot.diff; $PREFIX already begins with a slash
  • cleaned up destroot: no need to create that directory beforehand, and no need to overwrite destroot.destdir; just add desired nonstandard args to destroot.args
  • added code from PortfileRecipes for installing documentation files; more documentation appears to be available in the doc/ directory; you may want to read doc/README.txt and see if you can improve the port to install those files as well

comment:6 in reply to:  5 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign@…:

  • cleaned up destroot: no need to create that directory beforehand, and no need to overwrite destroot.destdir; just add desired nonstandard args to destroot.args
  • added code from PortfileRecipes for installing documentation files; more documentation appears to be available in the doc/ directory; you may want to read doc/README.txt and see if you can improve the port to install those files as well

Sorry, I see now what was going on here. The port already installs the docs into a weird directory, and by creating share/doc before the destroot, you were allowing aap's own build system to install a symlink into that directory pointing to the weird directory.

However, the symlink points to the weird directory within the destroot, so that doesn't actually work after the port has been installed and the destroot has been deleted:

$ ls -ld /opt/local/share/doc/aap
lrwxr-xr-x  1 root  wheel  118 Oct 14 19:30 /opt/local/share/doc/aap -> /opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_aap/work/destroot/opt/local/lib/aap/Exec-1.091/doc

comment:7 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Your patch-destroot.diff is strange beginning with "DESTDIR = $DESTDIR$PREFIX". It is not usual to assign DESTDIR the combined value of DESTDIR and PREFIX; instead, one usually evaluates each occurrence where PREFIX is used and decides whether to prefix it at that point with DESTDIR or not. Doing it this way would have enabled you to decide, at the point where the symlink to the doc dir is created, that the target of the symlink should not be prefixed with DESTDIR.

Note: See TracTickets for help on using tickets.