Opened 15 months ago
#67993 assigned defect
apcupsd @3.14.14_2: Should not hardcode MacPorts Applications dir
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | stephenreay (Stephen Reay) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | Cc: | ||
Port: | apcupsd |
Description
The apcupsd port uses a patchfile which reads:
-
src/apcagent/Makefile
old new 38 38 all-uninstall: uninstall-apcagent 39 39 40 40 install-apcagent: 41 $(call MKDIR,/Applications )42 $(call COPY,apcagent.app, Applications)41 $(call MKDIR,/Applications/MacPorts/) 42 $(call COPY,apcagent.app,/Applications/MacPorts/) 43 43 44 44 uninstall-apcagent: 45 $(call UNINST,/Applications/ apcagent.app)45 $(call UNINST,/Applications/MacPorts/apcagent.app) 46 46 47 47 # Include dependencies 48 48 -include $(DEPS)
/Applications/MacPorts
should not be hardcoded. Arrange to use the value of the variable ${applications_dir}
instead, for example by using a placeholder like @APPLICATIONS_DIR@
in the patchfile and then using reinplace
in a post-patch block in the Portfile to replace that placeholder with the variable's value. Since this potentially changes where files install (for users who use a non-default applications dir), the revision
must be increased.
Note: See
TracTickets for help on using
tickets.