pkgsrc/lang/siod/patches/patch-aa
ahoka 769e6780cc Add destdir support and mark not make jobs safe.
Submitted by Aleksej Saushev in PR pkg/39406.
2008-08-28 13:15:27 +00:00

95 lines
2.7 KiB
Text

$NetBSD: patch-aa,v 1.5 2008/08/28 13:15:27 ahoka Exp $
NetBSD definition for makefile, and make solaris into SunOS so
that we can use ${OPSYS}.
--- makefile.orig 1998-02-20 15:52:04.000000000 +0300
+++ makefile 2008-08-26 01:43:42.000000000 +0400
@@ -19,10 +19,10 @@
#
#
MANSEC=1
-MANDIR=$(IROOT)/usr/local/man/man$(MANSEC)
-BINDIR=$(IROOT)/usr/local/bin
-INCDIR=$(IROOT)/usr/local/include
-LIBDIR=$(IROOT)/usr/local/lib
+MANDIR=$(IROOT)${PREFIX}/man/man$(MANSEC)
+BINDIR=$(IROOT)${PREFIX}/bin
+INCDIR=$(IROOT)${PREFIX}/include
+LIBDIR=$(IROOT)${PREFIX}/lib
LIBSIODDIR=$(LIBDIR)/siod
CP_F=cp -f
# -Wmissing-prototypes
@@ -137,10 +137,9 @@
# from /usr/lib/libSYBxxx.so -> /sybase/lib/libxxx.so
# for each shared library in /sybase/lib.
-solaris:
+SunOS:
$(MAKE) $(LDLP) \
PROGS="siod ndbm.so tar.so parser_pratt.so ss.so regex.so" \
- CC=gcc \
LD=ld \
CFLAGS="$(GCCW) $(CDEBUG) -DSUN5 -O2 $(SLD)" \
LD_EXE_FLAGS="-R $(LIBDIR) -R $(LIBSIODDIR)" \
@@ -150,6 +149,18 @@
SO="so" \
build_driver
+NetBSD DragonFly:
+ $(MAKE) $(LDLP) \
+ PROGS="siod ndbm.so tar.so parser_pratt.so ss.so regex.so" \
+ LD=ld \
+ CFLAGS="$(GCCW) $(CDEBUG) -DSUN5 -O2 $(SLD) -I${INCDIR} -fPIC -DPIC" \
+ LD_EXE_FLAGS="-Wl,-R$(LIBDIR) -L${LIBDIR} -Wl,-R$(LIBSIODDIR) -L${LIBSIODDIR}" \
+ LD_EXE_LIBS="-lm" \
+ LD_LIB_FLAGS="-G" \
+ LD_LIB_LIBS="$(LD_EXE_LIBS) -lm -lcrypt" \
+ SO="so" \
+ build_driver
+
sybsolaris:
$(MAKE) $(LDLP) \
PROGS="siod ndbm.so tar.so parser_pratt.so ss.so regex.so\
@@ -419,30 +430,30 @@
install: $(DISTFILES)
@echo "Note: This does not do a build. Only installs what already"
@echo " sits in the directory."
- -mkdir -p $(MANDIR)
- -mkdir -p $(BINDIR)
- -mkdir -p $(LIBDIR)
- -mkdir -p $(INCDIR)
- -mkdir -p $(LIBSIODDIR)
+ -mkdir -p $(DESTDIR)$(MANDIR)
+ -mkdir -p $(DESTDIR)$(BINDIR)
+ -mkdir -p $(DESTDIR)$(LIBDIR)
+ -mkdir -p $(DESTDIR)$(INCDIR)
+ -mkdir -p $(DESTDIR)$(LIBSIODDIR)
-for X in $(INTO_BINDIR) ; do \
- $(CP_F) $$X $(BINDIR) ;\
+ $(CP_F) $$X $(DESTDIR)$(BINDIR) ;\
done
-for X in $(LIBFILES) ; do \
- $(CP_F) $$X $(LIBSIODDIR) ;\
+ $(CP_F) $$X $(DESTDIR)$(LIBSIODDIR) ;\
done
-for X in $(SOLIBFILES) ; do \
for E in so sl ; do \
- $(CP_F) $$X.$$E $(LIBSIODDIR) ;\
+ $(CP_F) $$X.$$E $(DESTDIR)$(LIBSIODDIR) ;\
done ;\
done
-for X in $(INTO_LIBDIR) ; do \
- $(CP_F) $$X $(LIBDIR) ;\
+ $(CP_F) $$X $(DESTDIR)$(LIBDIR) ;\
done
-for X in $(MANPAGES) ; do \
- $(CP_F) $$X.man $(MANDIR)/$$X.$(MANSEC) ;\
+ $(CP_F) $$X.man $(DESTDIR)$(MANDIR)/$$X.$(MANSEC) ;\
done
-for X in $(PUBINCS) ; do \
- $(CP_F) $$X $(INCDIR) ;\
+ $(CP_F) $$X $(DESTDIR)$(INCDIR) ;\
done
@echo "Install done."