Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deforaos-browser: avoid conflicts with other packages #288

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

khorben
Copy link
Contributor

@khorben khorben commented Jul 31, 2024

The binaries installed by the port in /usr/local/bin were prefixed with "deforaos-" to avoid installing files conflicting with other packages, such as sysutils/schilyutils and science/silo.

Comment on lines +32 to +35
MAKE_ARGS+= CPPFLAGS+=-DPROGNAME_BROWSER=\\\"deforaos-browser\\\"
MAKE_ARGS+= CPPFLAGS+=-DPROGNAME_COPY=\\\"deforaos-copy\\\"
MAKE_ARGS+= CPPFLAGS+=-DPROGNAME_DESKTOP=\\\"deforaos-desktop\\\"
MAKE_ARGS+= CPPFLAGS+=-DPROGNAME_DESKTOPCTL=\\\"deforaos-desktopctl\\\"
MAKE_ARGS+= CPPFLAGS+=-DPROGNAME_MOVE=\\\"deforaos-move\\\"
MAKE_ARGS+= CPPFLAGS+=-DPROGNAME_OPEN=\\\"deforaos-open\\\"
MAKE_ARGS+= CPPFLAGS+=-DPROGNAME_PROPERTIES=\\\"deforaos-properties\\\"
MAKE_ARGS+= CPPFLAGS+=-DPROGNAME_VIEW=\\\"deforaos-view\\\"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can set CPPFLAGS directly.

MAKE_ARGS+=	PREFIX=${PREFIX}
MAKE_ENV+=	MANDIR=${STAGEDIR}${PREFIX}/share/man

CPPFLAGS=	-DPROGNAME_BROWSER=deforaos-browser \
		-DPROGNAME_COPY=deforaos-copy \
		-DPROGNAME_DESKTOP=deforaos-desktop \
		-DPROGNAME_DESKTOPCTL=deforaos-desktopctl \
		-DPROGNAME_MOVE=deforaos-move \
		-DPROGNAME_OPEN=deforaos-open \
		-DPROGNAME_PROPERTIES=deforaos-properties \
		-DPROGNAME_VIEW=deforaos-view

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this only works if HAS_CONFIGURE is set, and this software does not use GNU configure.

Mk/bsd.port.mk:

2039 MAKE_ENV+=              PREFIX=${PREFIX} \
2040                         LOCALBASE=${LOCALBASE} \
2041                         CC="${CC}" CFLAGS="${CFLAGS}" \
2042                         CPP="${CPP}" CPPFLAGS="${CPPFLAGS}" \
2043                         LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \
2044                         CXX="${CXX}" CXXFLAGS="${CXXFLAGS}"

But the Makefiles from DeforaOS ignore the environment. (They set CPPFLAGS=... in order to avoid surprises)

Mk/bsd.port.mk:

3316 .      if defined(HAS_CONFIGURE)
[...]
3320                 if ! ${SETENVI} ${WRK_ENV} CC="${CC}" CPP="${CPP}" CXX="${CXX}" \
3321             CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" CXXFLAGS="${CXXFLAGS}" \
3322             LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \
[...]
3328             ${CONFIGURE_ENV} ${CONFIGURE_CMD} ${CONFIGURE_ARGS}; then \
3329                          ${ECHO_MSG} "===>  Script \"${CONFIGURE_SCRIPT}\" failed unexpectedly."; \
3330                          (${ECHO_CMD} ${CONFIGURE_FAIL_MESSAGE}) | ${FMT_80} ; \
3331                          ${FALSE}; \
3332                 fi)
3333 .      endif

khorben added a commit to khorben/freebsd-ports that referenced this pull request Sep 2, 2024
Prefix the installed binaries with "deforaos-" to avoid conflicts with
other packages, such as sysutils/schilyutils and science/silo.

Sponsored by:	The FreeBSD Foundation
Pull Request:	freebsd#288
@khorben khorben force-pushed the khorben/deforaos-browser-prefix branch from da3c84c to f961383 Compare September 2, 2024 15:00
Prefix the installed binaries with "deforaos-" to avoid conflicts with
other packages, such as sysutils/schilyutils and science/silo.

Sponsored by:	The FreeBSD Foundation
Pull Request:	freebsd#288
@khorben khorben force-pushed the khorben/deforaos-browser-prefix branch from f961383 to 458fb35 Compare September 2, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants