[MacPorts] #67993: apcupsd @3.14.14_2: Should not hardcode MacPorts Applications dir
MacPorts
noreply at macports.org
Sat Aug 19 22:12:27 UTC 2023
#67993: apcupsd @3.14.14_2: Should not hardcode MacPorts Applications dir
------------------------+-------------------------
Reporter: ryandesign | Owner: stephenreay
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Keywords: | Port: apcupsd
------------------------+-------------------------
The apcupsd port uses a patchfile which reads:
{{{#!diff
--- src/apcagent/Makefile.orig 2023-07-02 17:10:41
+++ src/apcagent/Makefile 2023-07-02 17:11:41
@@ -38,11 +38,11 @@
all-uninstall: uninstall-apcagent
install-apcagent:
- $(call MKDIR,/Applications)
- $(call COPY,apcagent.app,Applications)
+ $(call MKDIR,/Applications/MacPorts/)
+ $(call COPY,apcagent.app,/Applications/MacPorts/)
uninstall-apcagent:
- $(call UNINST,/Applications/apcagent.app)
+ $(call UNINST,/Applications/MacPorts/apcagent.app)
# Include dependencies
-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.
--
Ticket URL: <https://trac.macports.org/ticket/67993>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list