Hi, While playing with haskell port, I saw some part of devel/cabal module which could be changed.
- set ONLY_FOR_ARCHS only conditionnally - MODCABAL_BUILD_TARGET and MODCABAL_INSTALL_TARGET should be public to permit overriding do-build/do-install and still use the variable I checked that current port using devel/cabal doesn't changed. Comments or OK ? -- Sebastien Marie diff f85ef1dbf788a08d1418e8125eb85309f409fc4b /home/semarie/repos/openbsd/ports blob - c3f8d4ed9a2b6a07f803aba8406671182783e351 file + devel/cabal/cabal.port.mk --- devel/cabal/cabal.port.mk +++ devel/cabal/cabal.port.mk @@ -32,7 +32,7 @@ # Special files: # files/cabal.project is used automatically. -ONLY_FOR_ARCHS = i386 amd64 +ONLY_FOR_ARCHS ?= i386 amd64 BUILD_DEPENDS += devel/cabal-install>=3.4.0.0 \ lang/ghc>=8.6.4 @@ -97,7 +97,7 @@ MODCABAL_post-extract += \ _MODCABAL_CABAL = ${SETENV} ${MAKE_ENV} HOME=${WRKDIR} ${LOCALBASE}/bin/cabal # Building a cabal package is merely an invocation of cabal v2-build. -_MODCABAL_BUILD_TARGET = \ +MODCABAL_BUILD_TARGET = \ cd ${WRKBUILD} \ && ${_MODCABAL_CABAL} v2-build --offline --disable-benchmarks --disable-tests \ -w ${LOCALBASE}/bin/ghc \ @@ -106,16 +106,16 @@ _MODCABAL_BUILD_TARGET = \ ${MODCABAL_EXECUTABLES:C/^/exe:&/} # Install fragment starts this way for uniformity of incremental construction. -_MODCABAL_INSTALL_TARGET = true +MODCABAL_INSTALL_TARGET = true # Prepares wrapping fragments that only need to be set up once and # reused across potentially multiple installed executables. .if defined(MODCABAL_DATA_DIR) _MODCABAL_LIBEXEC = libexec/cabal -_MODCABAL_INSTALL_TARGET += \ +MODCABAL_INSTALL_TARGET += \ && mkdir -p ${PREFIX}/${_MODCABAL_LIBEXEC} -_MODCABAL_INSTALL_TARGET += \ +MODCABAL_INSTALL_TARGET += \ && ${INSTALL_DATA_DIR} ${WRKSRC}/${MODCABAL_DATA_DIR} ${PREFIX}/share/${DISTNAME} \ && cd ${WRKSRC}/${MODCABAL_DATA_DIR} && umask 022 && pax -rw . ${PREFIX}/share/${DISTNAME} .endif @@ -129,7 +129,7 @@ MODCABAL_BUILT_EXECUTABLE_${_exe} = $$(find ${WRKSRC}/ # Installs the ELF binary into an auxiliary location and wraps it into # a script which sets up the environment to point at the data-dir # files if any. -_MODCABAL_INSTALL_TARGET += \ +MODCABAL_INSTALL_TARGET += \ && ${INSTALL_PROGRAM} \ ${MODCABAL_BUILT_EXECUTABLE_${_exe}} \ ${PREFIX}/${_MODCABAL_LIBEXEC}/${_exe} \ @@ -139,17 +139,17 @@ _MODCABAL_INSTALL_TARGET += \ && chmod +x ${STAGEDIR}${PREFIX}/bin/${_exe} . else # Skips the launcher script indirection when MODCABAL_DATA_DIR is empty. -_MODCABAL_INSTALL_TARGET += \ +MODCABAL_INSTALL_TARGET += \ && ${INSTALL_PROGRAM} ${MODCABAL_BUILT_EXECUTABLE_${_exe}} ${PREFIX}/bin . endif .endfor .if !target(do-build) do-build: - @${_MODCABAL_BUILD_TARGET} + @${MODCABAL_BUILD_TARGET} .endif .if !target(do-install) do-install: - @${_MODCABAL_INSTALL_TARGET} + @${MODCABAL_INSTALL_TARGET} .endif