summaryrefslogtreecommitdiff
path: root/development
diff options
context:
space:
mode:
Diffstat (limited to 'development')
-rw-r--r--development/tcc/makefile_destdir.patch97
-rw-r--r--development/tcc/slack-desc2
-rw-r--r--development/tcc/tcc.SlackBuild27
-rw-r--r--development/tcc/tcc.info2
4 files changed, 117 insertions, 11 deletions
diff --git a/development/tcc/makefile_destdir.patch b/development/tcc/makefile_destdir.patch
new file mode 100644
index 0000000000..8d62c94214
--- /dev/null
+++ b/development/tcc/makefile_destdir.patch
@@ -0,0 +1,97 @@
+Index: tcc-0.9.25/Makefile
+===================================================================
+--- tcc-0.9.25.orig/Makefile
++++ tcc-0.9.25/Makefile
+@@ -13,6 +13,10 @@ ifneq ($(GCC_MAJOR),2)
+ CFLAGS+=-fno-strict-aliasing
+ endif
+
++ifndef ($(DESTDIR))
++DESTDIR = /
++endif
++
+ ifeq ($(ARCH),i386)
+ CFLAGS+=-mpreferred-stack-boundary=2
+ ifeq ($(GCC_MAJOR),2)
+@@ -197,48 +201,48 @@ INSTALL=install
+
+ ifndef CONFIG_WIN32
+ install: $(PROGS) $(LIBTCC1) $(BCHECK_O) libtcc.a tcc.1 tcc-doc.html
+- mkdir -p "$(bindir)"
+- $(INSTALL) -s -m755 $(PROGS) "$(bindir)"
+- mkdir -p "$(mandir)/man1"
+- $(INSTALL) tcc.1 "$(mandir)/man1"
+- mkdir -p "$(tccdir)"
+- mkdir -p "$(tccdir)/include"
++ mkdir -p "$(DESTDIR)/$(bindir)"
++ $(INSTALL) -s -m755 $(PROGS) "$(DESTDIR)/$(bindir)"
++ mkdir -p "$(DESTDIR)/$(mandir)/man1"
++ $(INSTALL) tcc.1 "$(DESTDIR)/$(mandir)/man1"
++ mkdir -p "$(DESTDIR)/$(tccdir)"
++ mkdir -p "$(DESTDIR)/$(tccdir)/include"
+ ifneq ($(LIBTCC1),)
+- $(INSTALL) -m644 $(LIBTCC1) "$(tccdir)"
++ $(INSTALL) -m644 $(LIBTCC1) "$(DESTDIR)/$(tccdir)"
+ endif
+ ifneq ($(BCHECK_O),)
+- $(INSTALL) -m644 $(BCHECK_O) "$(tccdir)"
++ $(INSTALL) -m644 $(BCHECK_O) "$(DESTDIR)/$(tccdir)"
+ endif
+- $(INSTALL) -m644 $(addprefix include/,$(TCC_INCLUDES)) "$(tccdir)/include"
+- mkdir -p "$(docdir)"
+- $(INSTALL) -m644 tcc-doc.html "$(docdir)"
+- mkdir -p "$(libdir)"
+- $(INSTALL) -m644 libtcc.a "$(libdir)"
+- mkdir -p "$(includedir)"
+- $(INSTALL) -m644 libtcc.h "$(includedir)"
++ $(INSTALL) -m644 $(addprefix include/,$(TCC_INCLUDES)) "$(DESTDIR)/$(tccdir)/include"
++ mkdir -p "$(DESTDIR)/$(docdir)"
++ $(INSTALL) -m644 tcc-doc.html "$(DESTDIR)/$(docdir)"
++ mkdir -p "$(DESTDIR)/$(libdir)"
++ $(INSTALL) -m644 libtcc.a "$(DESTDIR)/$(libdir)"
++ mkdir -p "$(DESTDIR)/$(includedir)"
++ $(INSTALL) -m644 libtcc.h "$(DESTDIR)/$(includedir)"
+
+ uninstall:
+- rm -fv $(foreach P,$(PROGS),"$(bindir)/$P")
+- rm -fv $(foreach P,$(LIBTCC1) $(BCHECK_O),"$(tccdir)/$P")
+- rm -fv $(foreach P,$(TCC_INCLUDES),"$(tccdir)/include/$P")
+- rm -fv "$(docdir)/tcc-doc.html" "$(mandir)/man1/tcc.1"
+- rm -fv "$(libdir)/libtcc.a" "$(includedir)/libtcc.h"
++ rm -fv $(foreach P,$(PROGS),"$(DESTDIR)/$(bindir)/$P")
++ rm -fv $(foreach P,$(LIBTCC1) $(BCHECK_O),"$(DESTDIR)/$(tccdir)/$P")
++ rm -fv $(foreach P,$(TCC_INCLUDES),"$(DESTDIR)/$(tccdir)/include/$P")
++ rm -fv "$(DESTDIR)/$(docdir)/tcc-doc.html" "$(DESTDIR)/$(mandir)/man1/tcc.1"
++ rm -fv "$(DESTDIR)/$(libdir)/libtcc.a" "$(includedir)/libtcc.h"
+
+ else
+ install: $(PROGS) $(LIBTCC1) libtcc.a tcc-doc.html
+- mkdir -p "$(tccdir)"
+- mkdir -p "$(tccdir)/lib"
+- mkdir -p "$(tccdir)/include"
+- mkdir -p "$(tccdir)/examples"
+- mkdir -p "$(tccdir)/doc"
+- mkdir -p "$(tccdir)/libtcc"
+- $(INSTALL) -s -m755 $(PROGS) "$(tccdir)"
+- $(INSTALL) -m644 $(LIBTCC1) win32/lib/*.def "$(tccdir)/lib"
+- cp -r win32/include/. "$(tccdir)/include"
+- cp -r win32/examples/. "$(tccdir)/examples"
+-# $(INSTALL) -m644 $(addprefix include/,$(TCC_INCLUDES)) "$(tccdir)/include"
+- $(INSTALL) -m644 tcc-doc.html win32/tcc-win32.txt "$(tccdir)/doc"
+- $(INSTALL) -m644 libtcc.a libtcc.h "$(tccdir)/libtcc"
++ mkdir -p "$(DESTDIR)/$(tccdir)"
++ mkdir -p "$(DESTDIR)/$(tccdir)/lib"
++ mkdir -p "$(DESTDIR)/$(tccdir)/include"
++ mkdir -p "$(DESTDIR)/$(tccdir)/examples"
++ mkdir -p "$(DESTDIR)/$(tccdir)/doc"
++ mkdir -p "$(DESTDIR)/$(tccdir)/libtcc"
++ $(INSTALL) -s -m755 $(PROGS) "$(DESTDIR)/$(tccdir)"
++ $(INSTALL) -m644 $(LIBTCC1) win32/lib/*.def "$(DESTDIR)/$(tccdir)/lib"
++ cp -r win32/include/. "$(DESTDIR)/$(tccdir)/include"
++ cp -r win32/examples/. "$(DESTDIR)/$(tccdir)/examples"
++# $(INSTALL) -m644 $(addprefix include/,$(TCC_INCLUDES)) "$(DESTDIR)/$(tccdir)/include"
++ $(INSTALL) -m644 tcc-doc.html win32/tcc-win32.txt "$(DESTDIR)/$(tccdir)/doc"
++ $(INSTALL) -m644 libtcc.a libtcc.h "$(DESTDIR)/$(tccdir)/libtcc"
+ endif
+
+ # documentation and man page
diff --git a/development/tcc/slack-desc b/development/tcc/slack-desc
index 527aa5a635..cc6b66651c 100644
--- a/development/tcc/slack-desc
+++ b/development/tcc/slack-desc
@@ -5,7 +5,7 @@
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
- |----------handy-ruler------------------------------------------------|
+ |----------handy-ruler-------------------------------------------------|
tcc: tcc (Tiny C Compiler)
tcc:
tcc: Tiny C Compiler is a very fast C compiler. Unlike other C compilers,
diff --git a/development/tcc/tcc.SlackBuild b/development/tcc/tcc.SlackBuild
index d7bc39db74..e463f85bed 100644
--- a/development/tcc/tcc.SlackBuild
+++ b/development/tcc/tcc.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for tiny c compiler
-# Copyright (c) 2010 Markus Reichelt, Aachen, DE
+# Copyright (c) 2010,2011 Markus Reichelt, Aachen, DE
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -26,10 +26,11 @@
# markus reichelt, slackbuilds@mareichelt.de, 0xCCEEF115
# in memoriam of Georg Ohler
# 2010 Aug 23 - initial release
-
+# 2011 Oct 30 - incorporated fixes & Makefile patch from Vincent Batts
+
PRGNAM=tcc
VERSION=${VERSION:-0.9.25}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -79,21 +80,29 @@ if [ "$CROSS" = "yes" ]; then
else OPT=""
fi
+cat $CWD/makefile_destdir.patch | patch -p1 --backup
+
mkdir -p $PKG/usr/bin $PKG/usr/man/man1 $PKG/usr/doc $PKG/usr/include
DFLAGS=$LDFLAGS \
CFLAGS=$SLKCFLAGS \
./configure \
- --prefix=$PKG/usr \
- --libdir=$PKG/usr/lib$LIBDIRSUFFIX \
- --tccdir=$PKG/usr/lib$LIBDIRSUFFIX/tcc \
- --docdir=$PKG/usr/doc $OPT
+ --prefix=/usr \
+ --libdir=/usr/lib$LIBDIRSUFFIX \
+ --tccdir=/usr/lib$LIBDIRSUFFIX/tcc \
+ --docdir=/usr/doc $OPT
+
+if [ "$ARCH" = "x86_64" ] ; then
+ sed -i 's/lib/lib64/' config.h
+ sed -i 's/lib\//lib64\//' config.mak
+fi
make
#make test # this fails on x86_64
make install \
- tccdir=$PKG/usr/lib${LIBDIRSUFFIX}/tcc \
- docdir=$PKG/usr/doc/$PRGNAM-$VERSION
+ DESTDIR=$PKG \
+ tccdir=/usr/lib${LIBDIRSUFFIX}/tcc \
+ docdir=/usr/doc/$PRGNAM-$VERSION
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
diff --git a/development/tcc/tcc.info b/development/tcc/tcc.info
index 758b161ce0..4b52477f32 100644
--- a/development/tcc/tcc.info
+++ b/development/tcc/tcc.info
@@ -7,4 +7,4 @@ DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="markus reichelt"
EMAIL="slackbuilds@mareichelt.de"
-APPROVED="rworkman"
+APPROVED="rworkman,Niels Horn"