[arch-commits] Commit in julia/trunk (PKGBUILD sysfix.install)

Eli Schwartz eschwartz at archlinux.org
Wed Apr 18 15:13:51 UTC 2018


    Date: Wednesday, April 18, 2018 @ 15:13:50
  Author: eschwartz
Revision: 316900

upgpkg: julia 2:0.6.2-7

Learn to package.
FS#58221 FS#58257 FS#58258

- Don't modify /usr in the post-install, when this should be done in package().
  Especially don't add the dep needed, to *makedepends*.
- Don't use ld.so.conf.d to add private libdirs with vendored deps, to the system
  linker path (especially when this package uses rpath as G-d intended). Don't
  add this file to backup=()
- Don't try seeing if you should delete files willy-nilly, because of four-year-old
  fixed bugs where the CPU for i686 machines was building with -march=native.
- Don't forget to prune dependencies (arpack), because they're maintained in two places.

Modified:
  julia/trunk/PKGBUILD
Deleted:
  julia/trunk/sysfix.install

----------------+
 PKGBUILD       |   34 +++++++++++++---------------------
 sysfix.install |   13 -------------
 2 files changed, 13 insertions(+), 34 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-04-18 15:13:39 UTC (rev 316899)
+++ PKGBUILD	2018-04-18 15:13:50 UTC (rev 316900)
@@ -9,12 +9,13 @@
 pkgname=(julia julia-docs)
 epoch=2
 pkgver=0.6.2
-pkgrel=6
+pkgrel=7
 arch=('x86_64')
 pkgdesc='High-level, high-performance, dynamic programming language'
 url='https://julialang.org/'
 license=('MIT')
-makedepends=('chrpath' 'cmake' 'fftw' 'gcc-fortran' 'gmp' 'libgit2' 'libunwind' 'mpfr' 'pcre2' 'python2' 'suitesparse')
+depends=('fftw' 'hicolor-icon-theme' 'libgit2' 'libunwind' 'mpfr' 'pcre2' 'suitesparse')
+makedepends=('chrpath' 'cmake' 'gcc-fortran' 'gmp' 'python2')
 options=('!emptydirs' 'staticlibs')
 source=("https://github.com/JuliaLang/$pkgbase/releases/download/v$pkgver/$pkgbase-$pkgver-full.tar.gz"{,.asc}
         'julia-libunwind-version.patch'
@@ -26,8 +27,6 @@
 validpgpkeys=('3673DF529D9049477F76B37566E3C7DC03D6E495') # Julia (Binary signing key) <buildbot at julialang.org>
 
 prepare() {
-  # For /etc/ld.so.conf.d/
-  echo /usr/lib/julia > julia.conf
 
   cd "$pkgbase-$pkgver"
   patch -p1 -i ../julia-libunwind-version.patch
@@ -35,15 +34,12 @@
 }
 
 build() {
-  # Make sure not to set -march
-  export CFLAGS='-mtune=generic -O3 -pipe -fstack-protector-strong'
-  export CXXFLAGS='-mtune=generic -O3 -pipe -fstack-protector-strong'
-
-  unset ARCH
-
   # See FS#57387 for why USE_SYSTEM_LLVM=0, for now
   # See FS#58221 for why USE_SYSTEM_ARPACK=0, for now
 
+  # patchelf is not even used unless $(private_libdir_rel) != $(build_private_libdir_rel)
+  # but we USE_SYSTEM_PATCHELF=1 to prevent building it. This is why it is not in makedepends.
+
   make -C "$pkgbase-$pkgver" \
     prefix=/usr \
     sysconfdir=/etc \
@@ -73,17 +69,9 @@
 }
 
 package_julia() {
-  backup=('etc/ld.so.conf.d/julia.conf' 'etc/julia/juliarc.jl')
-  depends=('arpack' 'fftw' 'hicolor-icon-theme' 'libgit2' 'libunwind' 'mpfr' 'patchelf' 'pcre2' 'suitesparse')
+  backup=('etc/julia/juliarc.jl')
   optdepends=('gnuplot: If using the Gaston Package from julia')
-  install='sysfix.install'
 
-  # Make sure not to set -march
-  export CFLAGS="-mtune=generic -O3 -pipe -fstack-protector-strong"
-  export CXXFLAGS="-mtune=generic -O3 -pipe -fstack-protector-strong"
-
-  unset ARCH
-
   # See FS#57387 for why USE_SYSTEM_LLVM=0, for now
   # See FS#58221 for why USE_SYSTEM_ARPACK=0, for now
 
@@ -118,8 +106,10 @@
   # Remove duplicate man-page from julia/doc
   rm -rf "$pkgdir/usr/share/julia/doc/man"
 
-  # For /etc/ld.so.conf.d, FS#41731
-  install -Dm644 julia.conf "$pkgdir/etc/ld.so.conf.d/julia.conf"
+  # FS#58211 && https://github.com/JuliaLang/julia/issues/26830
+  chrpath -r '$ORIGIN/julia' "$pkgdir"/usr/lib/libjulia.so.0.6.2
+  # points to /usr/lib
+  chrpath -d "$pkgdir"/usr/bin/julia
 
   # Documentation and examples are in the julia-docs package
   rm -rf "$pkgdir/usr/share/"{doc,julia/doc,julia/examples}
@@ -130,11 +120,13 @@
 
 package_julia-docs() {
   pkgdesc='Documentation and examples for Julia'
+  depends=('julia')
 
   cd "$pkgbase-$pkgver"
 
   install -d "$pkgdir/usr/share/doc"
   cp -r doc "$pkgdir/usr/share/doc/$pkgbase"
+  rm -rf "$pkgdir"/usr/share/doc/julia/man/
   cp -r examples "$pkgdir/usr/share/doc/$pkgbase/examples"
   install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
 }

Deleted: sysfix.install
===================================================================
--- sysfix.install	2018-04-18 15:13:39 UTC (rev 316899)
+++ sysfix.install	2018-04-18 15:13:50 UTC (rev 316900)
@@ -1,13 +0,0 @@
-post_install() {
-  # Removing sys.so if needed, in order for Julia to start, see FS#39721
-  julia --version &>/dev/null || rm /usr/lib/julia/sys.so
-
-  # #58221
-  chrpath -r '/usr/lib/julia/' /usr/lib/libjulia.so.0.6.2
-}
-
-post_upgrade() {
-  post_install
-}
-
-# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list