Opened 9 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  
    3838all-uninstall: uninstall-apcagent
    3939
    4040install-apcagent:
    41         $(call MKDIR,/Applications)
    42         $(call COPY,apcagent.app,Applications)
     41        $(call MKDIR,/Applications/MacPorts/)
     42        $(call COPY,apcagent.app,/Applications/MacPorts/)
    4343
    4444uninstall-apcagent:
    45         $(call UNINST,/Applications/apcagent.app)
     45        $(call UNINST,/Applications/MacPorts/apcagent.app)
    4646
    4747# Include dependencies
    4848-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.

Change History (0)

Note: See TracTickets for help on using tickets.