diff --git a/community/astyle/APKBUILD b/community/astyle/APKBUILD index 92b60a4f272..6aab841fd7b 100644 --- a/community/astyle/APKBUILD +++ b/community/astyle/APKBUILD @@ -1,26 +1,28 @@ # Maintainer: André Klitzing pkgname=astyle -pkgver=3.1 -pkgrel=4 -pkgdesc="An automatic code formatter" +pkgver=3.3.1 +pkgrel=0 +pkgdesc="Automatic code formatter" options="!check" # No testsuite url="https://sourceforge.net/projects/astyle/" arch="all" license="MIT" -source="https://downloads.sourceforge.net/sourceforge/astyle/${pkgname}_${pkgver}_linux.tar.gz - fix-ppc64le-build.patch" - -builddir="$srcdir/$pkgname" +depends_dev="$pkgname=$pkgver-r$pkgrel" +subpackages="$pkgname-dev $pkgname-libs $pkgname-doc" +source="$pkgname-$pkgver.tar.bz2::https://gitlab.com/saalen/astyle/-/archive/$pkgver/astyle-$pkgver.tar.bz2 + makefile-install.patch + " +builddir="$srcdir/astyle-$pkgver/AStyle/build/gcc" build() { - cd build/gcc - make release + make shared release } package() { - cd build/gcc - install -Dm0755 bin/astyle "$pkgdir/usr/bin/astyle" + DESTDIR="$pkgdir" make INSTALL=install install } -sha512sums="2e8f13d291abda66bbba30174c364c81a81a490e0a21376f7da7cf471644c22caa37b9eefb100d093bf26d1a8bfa9d2f14b4c2a9b75b3cb84428b4514e277ff2 astyle_3.1_linux.tar.gz -ef934980659777d398ee53f20b68f94e06aa8e2c9036dc257adbfbc99b5b45914914011aa34d0015f7d60fa43daed39527ff335fed95c721a85aeb4b2a7675c5 fix-ppc64le-build.patch" +sha512sums=" +45c65623a8ffca104593fa96a03e4f673146107ab78fce359f36d85ec5884ee621f665d9250fb905b38e607bb57e9400bcc1aebb6a688eb3a3210af46f21b585 astyle-3.3.1.tar.bz2 +6bfaba1437af39cb9250f292fdf1409d83f2b9b73c4bb4abf5c06b0d993b2dec050e49ed904650042c2dacd92c4bfb0a32026900a47d5a28635985aa9116833e makefile-install.patch +" diff --git a/community/astyle/fix-ppc64le-build.patch b/community/astyle/fix-ppc64le-build.patch deleted file mode 100644 index 048dd82c1f4..00000000000 --- a/community/astyle/fix-ppc64le-build.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/astyle_main.cpp -+++ b/src/astyle_main.cpp -@@ -41,6 +41,7 @@ - #include - #include - #include -+#include - - // includes for recursive getFileNames() function - #ifdef _WIN32 diff --git a/community/astyle/makefile-install.patch b/community/astyle/makefile-install.patch new file mode 100644 index 00000000000..d29199c092d --- /dev/null +++ b/community/astyle/makefile-install.patch @@ -0,0 +1,64 @@ +diff --git a/Makefile b/Makefile +index e232a7d..e254ad3 100644 +--- a/Makefile ++++ b/Makefile +@@ -151,8 +151,8 @@ libastyle.so: $(OBJs) + @ mkdir -p $(bindir) + $(CXX) -shared $(LDFLAGSr) -Wl,-soname,libastyle.so.$(MAJORVER) \ + -o $(bindir)/libastyle.so.$(SOLIBVER) $^ +- @ln --symbolic --force libastyle.so.$(SOLIBVER) libastyle.so.$(MAJORVER) +- @ln --symbolic --force libastyle.so.$(MAJORVER) libastyle.so ++ @ln -sf libastyle.so.$(SOLIBVER) libastyle.so.$(MAJORVER) ++ @ln -sf libastyle.so.$(MAJORVER) libastyle.so + @mv libastyle.so* $(bindir)/ + @ echo + +@@ -161,8 +161,8 @@ libastyled.so: $(OBJsd) + @ mkdir -p $(bindir) + $(CXX) -shared $(LDFLAGSd) -Wl,-soname,libastyled.so.$(MAJORVER) \ + -o $(bindir)/libastyled.so.$(SOLIBVER) $^ +- @ln --symbolic --force libastyled.so.$(SOLIBVER) libastyled.so.$(MAJORVER) +- @ln --symbolic --force libastyled.so.$(MAJORVER) libastyled.so ++ @ln -sf libastyled.so.$(SOLIBVER) libastyled.so.$(MAJORVER) ++ @ln -sf libastyled.so.$(MAJORVER) libastyled.so + @mv libastyled.so* $(bindir)/ + @ echo + +@@ -209,23 +209,18 @@ cleanobj: + rm -f $(objdir)/*.o + + install: +- $(INSTALL) -m 755 -d $(ipath) +- @$(INSTALL) -m 755 $(bindir)/astyle $(ipath) +- +- @if [ -d $(SYSCONF_PATH)/html ]; then \ +- rm -rf $(SYSCONF_PATH)/html; \ +- fi +- +- $(INSTALL) -m 755 -d $(SYSCONF_PATH) +- @mkdir -p $(SYSCONF_PATH)/html; +- @for files in astyle.html \ +- install.html \ +- news.html \ +- notes.html \ +- styles.css; \ +- do \ +- $(INSTALL) -m 644 ../../doc/$$files $(SYSCONF_PATH)/html; \ +- done ++ # binary ++ $(INSTALL) -vDm755 -t $(DESTDIR)$(ipath) $(bindir)/astyle ++ ++ # header ++ $(INSTALL) -vDm644 ../../src/astyle.h -t $(DESTDIR)/$(prefix)/include ++ ++ # shared libraries ++ $(INSTALL) -m 755 -d $(DESTDIR)/$(prefix)/lib ++ find bin -name "*.so*" -exec cp -vP {} $(DESTDIR)/$(prefix)/lib \; ++ ++ # documentation ++ $(INSTALL) -vDm644 ../../doc/* -t $(DESTDIR)/$(SYSCONF_PATH)/html + + uninstall: + rm -f $(ipath)/astyle + +