Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111608439
D30014.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D30014.diff
View Options
diff --git a/Mk/Uses/cabal.mk b/Mk/Uses/cabal.mk
--- a/Mk/Uses/cabal.mk
+++ b/Mk/Uses/cabal.mk
@@ -76,6 +76,12 @@
DIST_SUBDIR?= cabal
. if !defined(USE_GITHUB) && !defined(USE_GITLAB) && !${cabal_ARGS:Mnodefault}
+_hackage_is_default= yes
+. else
+_hackage_is_default= no
+. endif
+
+. if ${_hackage_is_default} == yes
MASTER_SITES= https://hackage.haskell.org/package/${PORTNAME}-${PORTVERSION}/ \
http://hackage.haskell.org/package/${PORTNAME}-${PORTVERSION}/
DISTFILES+= ${PORTNAME}-${PORTVERSION}${CABAL_EXTRACT_SUFX}
@@ -125,8 +131,15 @@
cabal-extract: ${WRKDIR}
${RM} -rf ${CABAL_HOME}/.cabal
${SETENV} HOME=${CABAL_HOME} cabal new-update
+. if ${_hackage_is_default} == yes
cd ${WRKDIR} && \
${SETENV} ${LOCALE_ENV} HOME=${CABAL_HOME} cabal get ${PORTNAME}-${PORTVERSION}
+. else
+ ${MV} ${CABAL_HOME} /tmp/${PORTNAME}-cabal-home
+ cd ${.CURDIR} && ${MAKE} extract CABAL_BOOTSTRAP=yes
+ ${RM} -rf ${CABAL_HOME}
+ ${MV} /tmp/${PORTNAME}-cabal-home ${CABAL_HOME}
+. endif
# Fetches and unpacks dependencies sources for a cabal-extract'ed package.
# Builds them as side-effect.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 6, 11:13 PM (15 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17021314
Default Alt Text
D30014.diff (1 KB)
Attached To
Mode
D30014: Improve cabal-extract for USE_GITHUB/USE_GITLAB cases
Attached
Detach File
Event Timeline
Log In to Comment