Lines 1-27
Link Here
|
1 |
|
1 |
--- Makefile.orig 2009-08-18 01:46:16.000000000 -0600 |
2 |
$FreeBSD: ports/misc/libpri/files/patch-Makefile,v 1.8 2007/07/22 10:36:56 sobomax Exp $ |
2 |
+++ Makefile 2009-08-18 02:40:23.000000000 -0600 |
3 |
|
3 |
@@ -27,7 +27,7 @@ |
4 |
--- Makefile.orig |
|
|
5 |
+++ Makefile |
6 |
@@ -27,19 +27,19 @@ |
7 |
# Uncomment if you want libpri to count number of Q921/Q931 sent/received |
4 |
# Uncomment if you want libpri to count number of Q921/Q931 sent/received |
8 |
#LIBPRI_COUNTERS=-DLIBPRI_COUNTERS |
5 |
#LIBPRI_COUNTERS=-DLIBPRI_COUNTERS |
9 |
|
6 |
|
10 |
-CC=gcc |
7 |
-CC=gcc |
11 |
+CC?=gcc |
8 |
+CC?=gcc |
|
|
9 |
GREP=grep |
10 |
AWK=awk |
12 |
|
11 |
|
13 |
OSARCH=$(shell uname -s) |
12 |
@@ -40,14 +40,13 @@ |
14 |
PROC?=$(shell uname -m) |
13 |
SONAME:=1.4 |
15 |
|
14 |
|
16 |
STATIC_LIBRARY=libpri.a |
15 |
STATIC_LIBRARY=libpri.a |
17 |
-DYNAMIC_LIBRARY=libpri.so.1.0 |
16 |
-DYNAMIC_LIBRARY:=libpri.so.$(SONAME) |
18 |
+DYNAMIC_LIBRARY=libpri.so.1 |
17 |
+DYNAMIC_LIBRARY:=libpri.so.1 |
19 |
STATIC_OBJS=copy_string.o pri.o q921.o prisched.o q931.o pri_facility.o |
18 |
STATIC_OBJS=copy_string.o pri.o q921.o prisched.o q931.o pri_facility.o version.o |
20 |
DYNAMIC_OBJS=copy_string.lo pri.lo q921.lo prisched.lo q931.lo pri_facility.lo |
19 |
DYNAMIC_OBJS=copy_string.lo pri.lo q921.lo prisched.lo q931.lo pri_facility.lo version.lo |
21 |
-CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g $(ALERTING) $(LIBPRI_COUNTERS) |
20 |
-CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC $(ALERTING) $(LIBPRI_COUNTERS) |
22 |
-INSTALL_PREFIX=$(DESTDIR) |
21 |
-INSTALL_PREFIX=$(DESTDIR) |
23 |
-INSTALL_BASE=/usr |
22 |
-INSTALL_BASE=/usr |
24 |
-SOFLAGS = -Wl,-hlibpri.so.1.0 |
23 |
-libdir?=$(INSTALL_BASE)/lib |
|
|
24 |
-SOFLAGS:=-Wl,-h$(DYNAMIC_LIBRARY) |
25 |
+CFLAGS+=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g $(ALERTING) $(LIBPRI_COUNTERS) |
25 |
+CFLAGS+=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g $(ALERTING) $(LIBPRI_COUNTERS) |
26 |
+INSTALL_PREFIX=$(PREFIX) |
26 |
+INSTALL_PREFIX=$(PREFIX) |
27 |
+INSTALL_BASE= |
27 |
+INSTALL_BASE= |
Lines 29-35
Link Here
|
29 |
LDCONFIG = /sbin/ldconfig |
29 |
LDCONFIG = /sbin/ldconfig |
30 |
ifneq (,$(findstring X$(OSARCH)X, XLinuxX XGNU/kFreeBSDX)) |
30 |
ifneq (,$(findstring X$(OSARCH)X, XLinuxX XGNU/kFreeBSDX)) |
31 |
LDCONFIG_FLAGS=-n |
31 |
LDCONFIG_FLAGS=-n |
32 |
@@ -47,7 +47,7 @@ |
32 |
@@ -55,7 +54,7 @@ |
33 |
ifeq (${OSARCH},FreeBSD) |
33 |
ifeq (${OSARCH},FreeBSD) |
34 |
LDCONFIG_FLAGS=-m |
34 |
LDCONFIG_FLAGS=-m |
35 |
CFLAGS += -I../zaptel -I../zapata |
35 |
CFLAGS += -I../zaptel -I../zapata |
Lines 38-69
Link Here
|
38 |
endif |
38 |
endif |
39 |
endif |
39 |
endif |
40 |
ifeq (${OSARCH},SunOS) |
40 |
ifeq (${OSARCH},SunOS) |
41 |
@@ -80,12 +80,11 @@ |
41 |
@@ -100,22 +99,22 @@ |
42 |
mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/lib |
42 |
mkdir -p $(INSTALL_PREFIX)$(libdir) |
43 |
mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/include |
43 |
mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/include |
44 |
ifneq (${OSARCH},SunOS) |
44 |
ifneq (${OSARCH},SunOS) |
45 |
- install -m 644 libpri.h $(INSTALL_PREFIX)$(INSTALL_BASE)/include |
45 |
- install -m 644 libpri.h $(INSTALL_PREFIX)$(INSTALL_BASE)/include |
46 |
- install -m 755 $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib |
46 |
- install -m 755 $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(libdir) |
47 |
- if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled"); then /sbin/restorecon -v $(INSTALL_PREFIX)$(INSTALL_BASE)/lib/$(DYNAMIC_LIBRARY); fi |
47 |
- if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled"); then /sbin/restorecon -v $(INSTALL_PREFIX)$(libdir)/$(DYNAMIC_LIBRARY); fi |
48 |
- ( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1.0 libpri.so ; ln -sf libpri.so.1.0 libpri.so.1 ) |
48 |
- ( cd $(INSTALL_PREFIX)$(libdir) ; ln -sf libpri.so.$(SONAME) libpri.so) |
49 |
- install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib |
49 |
- install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(libdir) |
50 |
- if test $$(id -u) = 0; then $(LDCONFIG) $(LDCONFIG_FLAGS) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib; fi |
50 |
- if test $$(id -u) = 0; then $(LDCONFIG) $(LDCONFIG_FLAGS) $(INSTALL_PREFIX)$(libdir); fi |
51 |
+ echo installing libpri.h |
51 |
+ echo installing libpri.h |
52 |
+ $(BSD_INSTALL_DATA) libpri.h $(INSTALL_PREFIX)$(INSTALL_BASE)/include |
52 |
+ $(BSD_INSTALL_DATA) libpri.h $(INSTALL_PREFIX)$(INSTALL_BASE)/include |
53 |
+ $(BSD_INSTALL_PROGRAM) $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib |
53 |
+ $(BSD_INSTALL_PROGRAM) $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib |
54 |
+ ( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1 libpri.so ) |
54 |
+ ( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1 libpri.so ) |
55 |
+ $(BSD_INSTALL_DATA) $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib |
55 |
+ $(BSD_INSTALL_DATA) $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/lib |
|
|
56 |
+ |
56 |
else |
57 |
else |
57 |
install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include -m 644 libpri.h |
58 |
install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include -m 644 libpri.h |
58 |
install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -m 755 $(DYNAMIC_LIBRARY) |
59 |
install -f $(INSTALL_PREFIX)$(libdir) -m 755 $(DYNAMIC_LIBRARY) |
59 |
@@ -126,10 +125,6 @@ |
60 |
- ( cd $(INSTALL_PREFIX)$(libdir) ; ln -sf libpri.so.$(SONAME) libpri.so) |
|
|
61 |
+ ( cd $(INSTALL_PREFIX)$(libdir) ; ln -sf libpri.so.1 libpri.so) |
62 |
install -f $(INSTALL_PREFIX)$(libdir) -m 644 $(STATIC_LIBRARY) |
63 |
endif |
64 |
|
65 |
uninstall: |
66 |
@echo "Removing Libpri" |
67 |
- rm -f $(INSTALL_PREFIX)$(libdir)/libpri.so.$(SONAME) |
68 |
+ rm -f $(INSTALL_PREFIX)$(libdir)/libpri.so.1 |
69 |
rm -f $(INSTALL_PREFIX)$(libdir)/libpri.so |
70 |
rm -f $(INSTALL_PREFIX)$(libdir)/libpri.a |
71 |
rm -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include/libpri.h |
72 |
@@ -146,8 +145,6 @@ |
60 |
|
73 |
|
61 |
$(DYNAMIC_LIBRARY): $(DYNAMIC_OBJS) |
74 |
$(DYNAMIC_LIBRARY): $(DYNAMIC_OBJS) |
62 |
$(CC) -shared $(SOFLAGS) -o $@ $(DYNAMIC_OBJS) |
75 |
$(CC) -shared $(SOFLAGS) -o $@ $(DYNAMIC_OBJS) |
63 |
- $(LDCONFIG) $(LDCONFIG_FLAGS) . |
76 |
- $(LDCONFIG) $(LDCONFIG_FLAGS) . |
64 |
- ln -sf libpri.so.1.0 libpri.so |
77 |
- ln -sf libpri.so.$(SONAME) libpri.so |
65 |
- ln -sf libpri.so.1.0 libpri.so.1 |
|
|
66 |
- $(SOSLINK) |
67 |
|
78 |
|
68 |
clean: |
79 |
version.c: FORCE |
69 |
rm -f *.o *.so *.lo *.so.1 *.so.1.0 |
80 |
@build_tools/make_version_c > $@.tmp |