summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Beslik2015-07-03 17:41:19 +0300
committerRoman Beslik2015-07-03 17:41:19 +0300
commitb99ee13e16b089a209e50c9f793472c5d00a929d (patch)
tree1bce85681813c1edfc05b244dd309bdbf19ee9ce
downloadaur-libgcpp-svn.tar.gz
init
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD54
-rw-r--r--make-so.patch33
3 files changed, 112 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..06aa06fcc22f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = libgcpp-svn
+ pkgdesc = The GNU C preprocessor internals. A shared object (so) library.
+ pkgver = 215421
+ pkgrel = 1
+ url = https://gcc.gnu.org/onlinedocs/cppinternals/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ license = LGPL
+ license = FDL
+ license = custom
+ makedepends = subversion
+ makedepends = gcc
+ depends = glibc
+ source = gcc/include::svn://gcc.gnu.org/svn/gcc/trunk/include
+ source = gcc/libiberty::svn://gcc.gnu.org/svn/gcc/trunk/libiberty
+ source = gcc/libcpp::svn://gcc.gnu.org/svn/gcc/trunk/libcpp
+ source = make-so.patch
+ sha512sums = SKIP
+ sha512sums = SKIP
+ sha512sums = SKIP
+ sha512sums = 98a96f0138b6590d2c04ac203244b03bb55a496bacde1bac0f66e8a58f72761bb5953129e2c03d013209ab1d6867d28b75924477fe6407976f0a282d35a3f11a
+
+pkgname = libgcpp-svn
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0bf9a5b71b77
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# Contributor: <me@beroal.in.ua>
+# This library is extracted from the GNU C compiler source code.
+# The library file name is "gcpp" though it is named "cpp" in the source code.
+# This library includes the library "iberty" ("libiberty"). The source code of "iberty" and "gcpp" are obtained from VCS so their versions match.
+pkgname=libgcpp-svn
+pkgver=215421
+pkgrel=1
+pkgdesc="The GNU C preprocessor internals. A shared object (so) library."
+arch=(i686 x86_64)
+url="https://gcc.gnu.org/onlinedocs/cppinternals/"
+license=('GPL' 'LGPL' 'FDL' 'custom')
+depends=(glibc)
+makedepends=('subversion' 'gcc')
+source=(
+ gcc/include::svn://gcc.gnu.org/svn/gcc/trunk/include
+ gcc/libiberty::svn://gcc.gnu.org/svn/gcc/trunk/libiberty
+ gcc/libcpp::svn://gcc.gnu.org/svn/gcc/trunk/libcpp
+ make-so.patch
+ )
+sha512sums=(
+ SKIP
+ SKIP
+ SKIP
+ 98a96f0138b6590d2c04ac203244b03bb55a496bacde1bac0f66e8a58f72761bb5953129e2c03d013209ab1d6867d28b75924477fe6407976f0a282d35a3f11a
+ )
+
+pkgver () {
+ cd "${SRCDEST}/gcc/libcpp"
+ svnversion | tr -d [A-z]
+}
+prepare () {
+ cd "${SRCDEST}/gcc"
+ svn checkout svn://gcc.gnu.org/svn/gcc/trunk . --depth files
+ svn checkout svn://gcc.gnu.org/svn/gcc/trunk/gcc/config/i386 gcc/config/i386
+ cp -R gcc install-sh config.sub config.guess depcomp mkinstalldirs move-if-change "$srcdir"
+ cd "$srcdir/libcpp"
+ patch -p1 < ../make-so.patch
+}
+build () {
+ # "-O" because "_FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]"
+ CONFIGURE_OPTION="--prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info"
+
+ cd "$srcdir/libiberty"
+ ./configure $CONFIGURE_OPTION CFLAGS="$CFLAGS -O -fPIC" CPPFLAGS="$CPPFLAGS -O"
+ make
+
+ cd "$srcdir/libcpp"
+ ./configure $CONFIGURE_OPTION CFLAGS="$CFLAGS -O" CPPFLAGS="$CPPFLAGS -O" --enable-host-shared
+ make
+}
+package () {
+ cd "$srcdir"
+ install -D libcpp/libcpp.so "$pkgdir/usr/lib/libgcpp.so"
+}
diff --git a/make-so.patch b/make-so.patch
new file mode 100644
index 000000000000..ffc5b6d6f084
--- /dev/null
+++ b/make-so.patch
@@ -0,0 +1,33 @@
+diff -u -r 0/libcpp/Makefile.in 1/libcpp/Makefile.in
+--- 0/Makefile.in 2014-09-15 16:24:51.000000000 +0300
++++ 1/Makefile.in 2014-09-15 19:19:33.130393400 +0300
+@@ -91,15 +91,14 @@
+ expr.c files.c identifiers.c init.c lex.c line-map.c macro.c \
+ mkdeps.c pch.c symtab.c traditional.c
+
+-all: libcpp.a $(USED_CATALOGS)
++all: libcpp.so $(USED_CATALOGS)
+
+ .SUFFIXES:
+ .SUFFIXES: .c .gmo .o .obj .po .pox
+
+-libcpp.a: $(libcpp_a_OBJS)
+- -rm -f libcpp.a
+- $(AR) $(ARFLAGS) libcpp.a $(libcpp_a_OBJS)
+- $(RANLIB) libcpp.a
++libcpp.so: $(libcpp_a_OBJS)
++ -rm -f libcpp.so
++ $(CC) -shared -o libcpp.so $(LDFLAGS) $(libcpp_a_OBJS) -L../libiberty -liberty -lc
+
+ # Rules to rebuild the configuration
+
+@@ -172,7 +171,7 @@
+ -rm -f *.o
+
+ clean: mostlyclean
+- -rm -rf libcpp.a $(srcdir)/autom4te.cache
++ -rm -rf libcpp.so $(srcdir)/autom4te.cache
+
+ distclean: clean
+ -rm -f config.h stamp-h1 config.status config.cache config.log \
+Only in 1/libcpp: Makefile.in~