Changeset View
Standalone View
lang/julia/Makefile
- This file was added.
# Created by: Iblis Lin <iblis@hs.ntnu.edu.tw> | ||||||||||
PORTNAME= julia | ||||||||||
DISTVERSION= 1.7.0-rc3 | ||||||||||
DISTVERSIONSUFFIX= -full | ||||||||||
CATEGORIES= lang math | ||||||||||
MASTER_SITES= https://github.com/JuliaLang/julia/releases/download/v${DISTVERSION}/ | ||||||||||
thierry: Isn't it possible to replace MASTER_SITES by USE_GITHUB? | ||||||||||
Done Inline ActionsNot at this moment, julia's build system will try to download its libs during the bulid stage. rizor.reardon_yahoo.com: Not at this moment, julia's build system will try to download its libs during the bulid stage. | ||||||||||
Done Inline ActionsOn second thought if i can patch julia's build system so that it wont call out during the build stage and use GH_TUPLE from ports to Download its libs in advance i can use USE_GITHUB, let me look in to this a bit further. rizor.reardon_yahoo.com: On second thought if i can patch julia's build system so that it wont call out during the build… | ||||||||||
Not Done Inline ActionsIf the /releases/ tarball is manually built to contain more vendored stuff than just the auto archive of a git tag, it is actually better to use this URL. e.g. I use this in net-im/fractal (though with gitlab). Do not switch to USE_GITHUB in that case! val_packett.cool: If the `/releases/` tarball is manually built to contain more vendored stuff than just the auto… | ||||||||||
MAINTAINER= rizor.reardon@yahoo.com | ||||||||||
COMMENT= Julia Language: A fresh approach to technical computing | ||||||||||
Done Inline Actions
Mostly a nitpick, but how about arrowd: Mostly a nitpick, but how about | ||||||||||
LICENSE= MIT | ||||||||||
LICENSE_FILE= ${WRKSRC}/LICENSE.md | ||||||||||
ONLY_FOR_ARCHS= amd64 | ||||||||||
Done Inline ActionsCan you put an explanation for ONLY_FOR_ARCHS in the comment? Why is it only available for amd64? arrowd: Can you put an explanation for `ONLY_FOR_ARCHS` in the comment? Why is it only available for… | ||||||||||
BUILD_DEPENDS= patchelf:sysutils/patchelf \ | ||||||||||
cmake:devel/cmake | ||||||||||
Done Inline ActionsAnother style nitpick: add another tab symbol to align 7z... line with BUILD_DEPENDS below. arrowd: Another style nitpick: add another `tab` symbol to align `7z...` line with `BUILD_DEPENDS`… | ||||||||||
RUN_DEPENDS= 7z:archivers/p7zip \ | ||||||||||
gcc10>0:lang/gcc10 | ||||||||||
USES= gmake compiler:c++14-lang fortran python perl5 \ | ||||||||||
shebangfix | ||||||||||
LIB_DEPENDS= libcurl.so:ftp/curl \ | ||||||||||
thierryUnsubmitted Done Inline Actions"LIB_DEPENDS" has to appear earlier. thierry: "LIB_DEPENDS" has to appear earlier. | ||||||||||
libgit2.so:devel/libgit2 \ | ||||||||||
libgmp.so:math/gmp \ | ||||||||||
libmbedtls.so:security/mbedtls \ | ||||||||||
libmpfr.so:math/mpfr \ | ||||||||||
libpcre2-8.so:devel/pcre2 \ | ||||||||||
libssh2.so:security/libssh2 \ | ||||||||||
libutf8proc.so:textproc/utf8proc \ | ||||||||||
libopenblas.so:math/openblas \ | ||||||||||
libnghttp2.so:www/libnghttp2 \ | ||||||||||
Done Inline ActionsThis could be replaced by USES+=blaslapack thierry: This could be replaced by USES+=blaslapack | ||||||||||
Done Inline Actionsjulia depends on openblas not blas, rizor.reardon_yahoo.com: julia depends on openblas not blas,
did you mean USES+=blaslapack:openblas | ||||||||||
libunwind.so:devel/libunwind \ | ||||||||||
libopenlibm.so:math/openlibm | ||||||||||
BINARY_ALIAS= python3=${PYTHON_CMD} gfortran=gfortran10 | ||||||||||
Not Done Inline Actions
Hard-coding this will break configure phase in case of different GCC_DEFAULT. contact_shiori.com.br: Hard-coding this will break configure phase in case of different `GCC_DEFAULT`. | ||||||||||
Not Done Inline Actions
what about GCC_VERSION? contact_shiori.com.br: what about `GCC_VERSION`? | ||||||||||
Not Done Inline Actions
Hard-coding this will break configure phase in case of different GCC_DEFAULT. contact_shiori.com.br: Hard-coding this will break configure phase in case of different GCC_DEFAULT. | ||||||||||
USE_LDCONFIG= yes | ||||||||||
CFLAGS+= -fpic | ||||||||||
SHEBANG_GLOB= *.sh | ||||||||||
Done Inline Actions^ wait what? tcberner: ^ wait what? | ||||||||||
WRKSRC= ${WRKDIR}/julia-${DISTVERSION} | ||||||||||
Not Done Inline ActionsHow about doing the following changes about this variable:
arrowd: How about doing the following changes about this variable:
1. Rename it to `JULIA` to bring it… | ||||||||||
INSTALLDIR= julia/${PORTNAME}${PKGNAMESUFFIX} | ||||||||||
MANDIRS+= ${PREFIX}/${INSTALLDIR}/share/man/man1 | ||||||||||
ALL_TARGET= default | ||||||||||
INSTALL_TARGET= install | ||||||||||
TEST_TARGET= test | ||||||||||
PLIST_SUB= VERSION="${PORTVERSION:R}" \ | ||||||||||
JULIA="${INSTALLDIR}" \ | ||||||||||
LIB_VERSION=v1.7 | ||||||||||
Not Done Inline ActionsWhy do we need the -stdlib=libc++ flag? This is default for our Clang anyways, however some users are using GCC to compile stuff. Wouldn't this flag cause problems in such case? arrowd: Why do we need the `-stdlib=libc++` flag? This is default for our Clang anyways, however some… | ||||||||||
CXXFLAGS+= -stdlib=libc++ -std=c++14 | ||||||||||
MAKE_ARGS+= NO_GIT=1 \ | ||||||||||
USE_BINARYBUILDER=0 \ | ||||||||||
prefix=${PREFIX}/${INSTALLDIR} \ | ||||||||||
Not Done Inline ActionsDo we need DEBUG_VARS_OFF= FORCE_ASSERTIONS=0 for this to work properly? arrowd: Do we need `DEBUG_VARS_OFF= FORCE_ASSERTIONS=0` for this to work properly? | ||||||||||
JCXXFLAGS="${CXXFLAGS}" \ | ||||||||||
Not Done Inline ActionsThis is probably a no-op, since you don't define USE_GPL_LIBS anywhere. This should probably be changed to just USE_GPL_LIBS=0. arrowd: This is probably a no-op, since you don't define `USE_GPL_LIBS` anywhere. This should probably… | ||||||||||
FORCE_ASSERTIONS=${FORCE_ASSERTIONS} \ | ||||||||||
USE_GPL_LIBS=${USE_GPL_LIBS} \ | ||||||||||
ARCH=x86_64 \ | ||||||||||
USE_SYSTEM_CURL=1 \ | ||||||||||
USE_SYSTEM_GMP=1 \ | ||||||||||
USE_SYSTEM_OPENLIBM=1 \ | ||||||||||
USE_SYSTEM_LAPACK=1 \ | ||||||||||
USE_SYSTEM_LIBGIT2=1 \ | ||||||||||
USE_SYSTEM_LIBSSH2=1 \ | ||||||||||
USE_SYSTEM_MBEDTLS=1 \ | ||||||||||
USE_SYSTEM_MPFR=1 \ | ||||||||||
USE_SYSTEM_PATCHELF=1 \ | ||||||||||
USE_SYSTEM_PCRE=1 \ | ||||||||||
USE_SYSTEM_UTF8PROC=1 \ | ||||||||||
USE_SYSTEM_P7ZIP=1 \ | ||||||||||
USE_SYSTEM_BLAS=1 \ | ||||||||||
USE_SYSTEM_NGHTTP2=1 \ | ||||||||||
USE_SYSTEM_CSL=1 \ | ||||||||||
USE_SYSTEM_LIBUNWIND=1 | ||||||||||
OPTIONS_DEFINE= DEBUG DOCS NATIVE GPL_LIBS | ||||||||||
OPTIONS_DEFAULT= DOCS GPL_LIBS | ||||||||||
thierryUnsubmitted Done Inline Actions
use a tab (not space) after a variable name thierry: use a tab (not space) after a variable name | ||||||||||
OPTIONS_SUB= yes | ||||||||||
DEBUG_VARS= FORCE_ASSERTIONS=1 \ | ||||||||||
ALL_TARGET=all | ||||||||||
DEBUG_MAKE_ARGS= BUNDLE_DEBUG_LIBS=1 | ||||||||||
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX} | ||||||||||
PORTDOCS= html | ||||||||||
DOCS_VARS= INSTALL_TARGET+=install-docs | ||||||||||
GPL_LIBS_DESC= Build with GPL lib: SUITESPARSE | ||||||||||
GPL_LIBS_LIB_DEPENDS= libspqr.so:math/suitesparse-spqr \ | ||||||||||
libumfpack.so:math/suitesparse-umfpack | ||||||||||
GPL_LIBS_MAKE_ARGS= USE_SYSTEM_LIBSUITESPARSE=1 \ | ||||||||||
USE_GPL_LIBS=1 | ||||||||||
Done Inline Actions^ no need to specify the same port multiple times. tcberner: ^ no need to specify the same port multiple times. | ||||||||||
NATIVE_DESC= Build with native CPU JIT tuning | ||||||||||
NATIVE_MAKE_ARGS+= MARCH=native | ||||||||||
post-patch: | ||||||||||
echo "override TAGGED_RELEASE_BANNER=\"FreeBSD port lang/${PORTNAME}${PKGNAMESUFFIX} build\"" >> ${WRKSRC}/Make.user | ||||||||||
# unset ARCH for auto-detection | ||||||||||
Done Inline Actions^this should now no longer be required for the NATIVE option. You can move the variables up to the normal options block. tcberner: ^this should now no longer be required for the NATIVE option. You can move the variables up to… | ||||||||||
# Julia build script uses the name x86_86/x86, which are different from ports framework | ||||||||||
echo "ARCH=" >> ${WRKSRC}/Make.user | ||||||||||
echo "LIBBLAS= -lopenblas -L${LOCALBASE}/lib" >> ${WRKSRC}/Make.user | ||||||||||
echo "LIBBLASNAME=libopenblas" >> ${WRKSRC}/Make.user | ||||||||||
echo 'LIBLAPACK= $$(LIBBLAS)' >> ${WRKSRC}/Make.user | ||||||||||
Done Inline Actions^ could be done more declaratively without an if, via NATIVE_MAKE_ARGS tcberner: ^ could be done more declaratively without an if, via NATIVE_MAKE_ARGS | ||||||||||
echo 'LIBLAPACKNAME= $$(LIBBLASNAME)' >> ${WRKSRC}/Make.user | ||||||||||
post-configure: | ||||||||||
${CC} ${CFLAGS} -lopenblas ${LDFLAGS} -o ${WRKSRC}/check_openblas \ | ||||||||||
${FILESDIR}/check_openblas.c | ||||||||||
${WRKSRC}/check_openblas && ( \ | ||||||||||
Done Inline ActionsI'm a bit confused by this check. We do have USES=blaslapack:openblas unconditionally, so it should always be available. Why perform compile-check? arrowd: I'm a bit confused by this check. We do have `USES=blaslapack:openblas` unconditionally, so it… | ||||||||||
Done Inline ActionsThe test is to see if openblas was built with the INTERFACE64 knob on or off and set julia to build accordingly. rizor.reardon_yahoo.com: The test is to see if openblas was built with the INTERFACE64 knob on or off and set julia to… | ||||||||||
echo "USE_BLAS64=1" >> ${WRKSRC}/Make.user \ | ||||||||||
) || ( \ | ||||||||||
echo "USE_BLAS64=0" >> ${WRKSRC}/Make.user \ | ||||||||||
) | ||||||||||
do-install-DOCS-on: | ||||||||||
${MV} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/share/doc/julia ${STAGEDIR}${DOCSDIR} | ||||||||||
post-install: | ||||||||||
${RLN} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/bin/julia ${STAGEDIR}${PREFIX}/bin/${PORTNAME}${PKGNAMESUFFIX} | ||||||||||
${RLN} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/share/man/man1/julia.1 ${STAGEDIR}${PREFIX}/man/man1/${PORTNAME}.1 | ||||||||||
${RM} -r ${STAGEDIR}${PREFIX}/${INSTALLDIR}/share/doc | ||||||||||
# clean up for Pkg3.jl | ||||||||||
.for file in .codecov.yml .travis.yml appveyor.yml bors.toml .gitignore source-extracted | ||||||||||
${RM} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/share/julia/stdlib/v${PORTVERSION:R}/Pkg/${file} | ||||||||||
Not Done Inline ActionsCan' this be done without nested loop? .for file in .codecov.yml .travis.yml appveyor.yml bors.toml .gitignore source-extracted .github ${FIND} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/share/julia/stdlib/v${PORTVERSION:R} -name ${file} .endfor arrowd: Can' this be done without nested loop?
```
.for file in .codecov.yml .travis.yml appveyor.yml… | ||||||||||
${RM} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/share/julia/stdlib/v${PORTVERSION:R}/Pkg/ext/TOML/${file} | ||||||||||
.endfor | ||||||||||
thierryUnsubmitted Done Inline Actionscontiguous blank lines (> 1 lines) found. thierry: contiguous blank lines (> 1 lines) found. | ||||||||||
post-install-DEBUG-off: | ||||||||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/bin/julia | ||||||||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/lib/julia/libccalltest.so | ||||||||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/lib/julia/libllvmcalltest.so | ||||||||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/lib/julia/libjulia-internal.so.1.7 | ||||||||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/lib/julia/libblastrampoline.so | ||||||||||
Not Done Inline ActionsThis could be put in a regular post-install target: $STRIP_CMD is only set to /usr/bin/strip when $WITH_DEVUG is not defined, else it is set to true. thierry: This could be put in a regular post-install target: $STRIP_CMD is only set to /usr/bin/strip… | ||||||||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/lib/julia/libdSFMT.so | ||||||||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/lib/julia/libuv.so.2.0.0 | ||||||||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/lib/julia/libz.so.1.2.11 | ||||||||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/lib/julia/libLLVM-12jl.so | ||||||||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/lib/julia/sys.so | ||||||||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/lib/libjulia.so.1.7 | ||||||||||
post-install-DEBUG-on: | ||||||||||
${RLN} ${STAGEDIR}${PREFIX}/${INSTALLDIR}/bin/julia-debug ${STAGEDIR}${PREFIX}/bin/${PORTNAME}${PKGNAMESUFFIX}-debug | ||||||||||
.include <bsd.port.mk> | ||||||||||
Done Inline Actions^ this seems also to get removed in the DOCS-on target --- why not consolidate it? tcberner: ^ this seems also to get removed in the DOCS-on target --- why not consolidate it? |
Isn't it possible to replace MASTER_SITES by USE_GITHUB?