summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2014-01-29 15:26:02 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2014-01-29 15:26:02 +0000
commitfbf4cc951756833c9b809f96ea7e2303f77f634b (patch)
treecd5f8eb40df49b64956b96bf3865d4d9c892b9f5 /lang
parent- Support STAGEDIR (diff)
Stafigy; clean up the Makefile and port description while here.
Notes
Notes: svn path=/head/; revision=341749
Diffstat (limited to 'lang')
-rw-r--r--lang/tcc/Makefile22
-rw-r--r--lang/tcc/files/patch-Makefile60
-rw-r--r--lang/tcc/pkg-descr34
-rw-r--r--lang/tcc/pkg-plist1
4 files changed, 73 insertions, 44 deletions
diff --git a/lang/tcc/Makefile b/lang/tcc/Makefile
index a50a7b7fb49d..7e9ea383e582 100644
--- a/lang/tcc/Makefile
+++ b/lang/tcc/Makefile
@@ -11,32 +11,22 @@ COMMENT= Tiny C Compiler
LICENSE= LGPL21
-OPTIONS_DEFINE= DOCS
-
ONLY_FOR_ARCHS= i386
-#ONLY_FOR_ARCHS= i386 amd64 arm alpha mips powerpc
+#ONLY_FOR_ARCHS= i386 amd64 arm mips powerpc
CONFLICTS= TenDRA-*
-USES= perl5
+USES= gmake perl5
USE_BZIP2= yes
USE_PERL5= build
-USE_GMAKE= yes
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix="${PREFIX}" --cc="${CC}"
MAKE_ARGS= CONFIG_NOLDL=1
-MAN1= tcc.1
+OPTIONS_DEFINE= DOCS
-NO_STAGE= yes
.include <bsd.port.options.mk>
-.if empty(PORT_OPTIONS:MDOCS)
-MAKE_ARGS+= NOPORTDOCS=1
-.endif
-
-.include <bsd.port.pre.mk>
-
.if ${ARCH} == "i386"
PLIST_SUB+= I386=""
.else
@@ -47,4 +37,8 @@ PLIST_SUB+= I386="@comment "
CFLAGS+= -fheinous-gnu-extensions
.endif
-.include <bsd.port.post.mk>
+.if ! ${PORT_OPTIONS:MDOCS}
+MAKE_ARGS+= NOPORTDOCS=1
+.endif
+
+.include <bsd.port.mk>
diff --git a/lang/tcc/files/patch-Makefile b/lang/tcc/files/patch-Makefile
index 30809392b05d..466560c84e5f 100644
--- a/lang/tcc/files/patch-Makefile
+++ b/lang/tcc/files/patch-Makefile
@@ -1,6 +1,6 @@
--- Makefile.orig 2009-05-18 16:27:06.000000000 +0200
+++ Makefile 2009-07-03 07:40:15.000000000 +0200
-@@ -28,6 +28,9 @@
+@@ -28,6 +28,9 @@ endif
ifeq ($(ARCH),x86-64)
CFLAGS+=-Wno-pointer-sign
endif
@@ -10,7 +10,7 @@
ifndef CONFIG_WIN32
LIBS=-lm
-@@ -53,6 +56,11 @@
+@@ -53,6 +56,11 @@ else
ifeq ($(ARCH),x86-64)
NATIVE_TARGET=-DTCC_TARGET_X86_64
LIBTCC1=libtcc1.a
@@ -22,7 +22,7 @@
endif
endif
endif
-@@ -99,6 +107,10 @@
+@@ -99,6 +107,10 @@ ifeq ($(ARCH),x86-64)
NATIVE_FILES=$(X86_64_FILES)
PROGS_CROSS=$(I386_CROSS) $(WIN32_CROSS) $(ARM_CROSS) $(C67_CROSS)
else
@@ -33,7 +33,7 @@
ifeq ($(ARCH),arm)
NATIVE_FILES=$(ARM_FILES)
PROGS_CROSS=$(I386_CROSS) $(X64_CROSS) $(WIN32_CROSS) $(C67_CROSS)
-@@ -106,6 +118,7 @@
+@@ -106,6 +118,7 @@ endif
endif
endif
endif
@@ -41,7 +41,7 @@
ifdef CONFIG_CROSS
PROGS+=$(PROGS_CROSS)
-@@ -180,7 +193,7 @@
+@@ -180,7 +193,7 @@ LIBTCC1_OBJS+=alloca86.o alloca86-bt.o
endif
%.o: %.c
@@ -50,7 +50,7 @@
%.o: %.S
$(LIBTCC1_CC) -o $@ -c $<
-@@ -189,7 +202,7 @@
+@@ -189,7 +202,7 @@ libtcc1.a: $(LIBTCC1_OBJS)
$(AR) rcs $@ $^
bcheck.o: bcheck.c
@@ -59,14 +59,46 @@
# install
TCC_INCLUDES = stdarg.h stddef.h stdbool.h float.h varargs.h tcclib.h
-@@ -210,8 +223,10 @@
- $(INSTALL) -m644 $(BCHECK_O) "$(tccdir)"
+@@ -197,25 +210,27 @@ 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
- $(INSTALL) -m644 $(addprefix include/,$(TCC_INCLUDES)) "$(tccdir)/include"
+ 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"
+ifndef NOPORTDOCS
- mkdir -p "$(docdir)"
- $(INSTALL) -m644 tcc-doc.html "$(docdir)"
++ mkdir -p "$(DESTDIR)$(docdir)"
++ $(INSTALL) -m644 tcc-doc.html "$(DESTDIR)$(docdir)"
+endif
- mkdir -p "$(libdir)"
- $(INSTALL) -m644 libtcc.a "$(libdir)"
- mkdir -p "$(includedir)"
++ 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")
diff --git a/lang/tcc/pkg-descr b/lang/tcc/pkg-descr
index c6bc6b7ef163..714ad7413001 100644
--- a/lang/tcc/pkg-descr
+++ b/lang/tcc/pkg-descr
@@ -1,19 +1,21 @@
-Tiny C Compiler
+Tiny C Compiler is perhaps the smallest ANSI C compiler, by Fabrice Bellard.
-Features:
-* SMALL! You can compile and execute C code everywhere, for example on rescue
- disks (about 100KB for x86 TCC executable, including C preprocessor,
- C compiler, assembler and linker).
-* FAST! tcc generates x86 code. No byte code overhead. Compile, assemble and
- link several times faster than GCC.
-* UNLIMITED! Any C dynamic library can be used directly. TCC is heading torward
- full ISOC99 compliance. TCC can of course compile itself.
-* SAFE! tcc includes an optional memory and bound checker. Bound checked code
- can be mixed freely with standard code.
-* Compile and execute C source directly. No linking or assembly necessary.
- Full C preprocessor and GNU-like assembler included.
-* C script supported : just add '#!/usr/local/bin/tcc -run' at the first line
- of your C source, and execute it directly from the command line.
-* With libtcc, you can use TCC as a backend for dynamic code generation.
+ - It is small: you can compile and execute C code everywhere, for example
+ on rescue disks;
+
+ - It is fast! TCC generates optimized x86 code. No byte code overhead.
+ Compile, assemble, and link about 7 times faster than 'gcc -O0';
+
+ - Any C dynamic library can be used directly. TCC is heading towards
+ full ISO C99 compliance. TCC can of course compile itself;
+
+ - It is safe! TCC includes optional memory and bound checker. Bound
+ checked code can be mixed freely with standard code;
+
+ - Compile and execute C source directly. No linking or assembly is
+ necessary. Full C preprocessor included;
+
+ - C script supported: just add '#!/bin/env tcc -run' at the first line
+ of your C source, and execute it directly from the command line.
WWW: http://bellard.org/tcc/
diff --git a/lang/tcc/pkg-plist b/lang/tcc/pkg-plist
index 63f4ecbbd773..dd2374fe303c 100644
--- a/lang/tcc/pkg-plist
+++ b/lang/tcc/pkg-plist
@@ -9,6 +9,7 @@ lib/tcc/include/stddef.h
lib/tcc/include/tcclib.h
lib/tcc/include/varargs.h
lib/tcc/libtcc1.a
+man/man1/tcc.1.gz
@dirrm lib/tcc/include
@dirrm lib/tcc
%%PORTDOCS%%%%DOCSDIR%%/tcc-doc.html