[Asterisk-bsd] ETA on libpri1.2.3? (misc/libpri)

Jason Lixfeld jason+lists.asterisk-bsd at lixfeld.ca
Sun Jun 18 15:02:37 MST 2006


Quick and dirty:  To apply that particular patch, you have to copy  
and paste the link as a file.. put it in /tmp for now and we'll move  
it later:

#vi /tmp/libpri.patch

Insert the patch from the link, but strip out the "diff -ruN stuff  
and the "patch begins here" and "patch ends here" lines, so you will  
end up with a /tmp/libpri.patch that looks like this:

--- libpri/Makefile	Thu Apr 27 14:08:35 2006
+++ libpri-tdgs/Makefile	Sun Jun  4 14:29:34 2006
@@ -6,17 +6,10 @@
  #

  PORTNAME=	libpri
-PORTVERSION=	1.2.2
-PORTREVISION=	1
+PORTVERSION=	1.2.3
  CATEGORIES=	misc
  MASTER_SITES=	ftp://ftp.digium.com/pub/libpri/ \
  		ftp://ftp.digium.com/pub/libpri/old/
-
-#PATCHFILES=	${PORTNAME}-${PORTVERSION}-${BRIVER}.patch.gz
-#PATCH_SITES=	${MASTER_SITE_LOCAL}
-#PATCH_SITE_SUBDIR=	fjoe
-#PATCH_DIST_STRIP=	-p1
-#BRIVER=		bristuff-0.3.0-PRE-1l

  MAINTAINER=	gonzo at univ.kiev.ua
  COMMENT=	A C implementation of the Primary Rate ISDN specification
--- libpri/distinfo	Wed Mar 15 08:09:23 2006
+++ libpri-tdgs/distinfo	Sun Jun  4 14:29:47 2006
@@ -1,6 +1,3 @@
-MD5 (libpri-1.2.2.tar.gz) = efce9c3699110588df5e4cf09eae01d9
-SHA256 (libpri-1.2.2.tar.gz) =  
168fce4699b77c1ac5ae176237dae2f289714be95ddd2fe8bdc25a22f00318dd
-SIZE (libpri-1.2.2.tar.gz) = 76070
-MD5 (libpri-1.2.2-bristuff-0.3.0-PRE-1l.patch.gz) =  
e24e00f07601f6c43fb3825d0e67af3c
-SHA256 (libpri-1.2.2-bristuff-0.3.0-PRE-1l.patch.gz) =  
92b4a8e5a36bb772b8cfc7e8563d4c422dec9415bc1f3247179a83ddf8352fdf
-SIZE (libpri-1.2.2-bristuff-0.3.0-PRE-1l.patch.gz) = 43755
+MD5 (libpri-1.2.3.tar.gz) = f365d9ee29a7253d605729a6d07ebfff
+SHA256 (libpri-1.2.3.tar.gz) =  
f4ca5d72aa4b5e5c99c4e1a9de7235af5ed12b51a20dd757f071f5d7cf9d0fd0
+SIZE (libpri-1.2.3.tar.gz) = 76348
--- libpri/files/patch-Makefile	Wed Apr 26 12:24:42 2006
+++ libpri-tdgs/files/patch-Makefile	Sun Jun  4 15:05:34 2006
@@ -1,5 +1,5 @@
---- Makefile.orig	Wed Jan 11 02:19:14 2006
-+++ Makefile	Wed Apr 26 02:47:21 2006
+--- Makefile.orig	Sun Apr 30 16:17:47 2006
++++ Makefile	Sun Jun  4 15:02:13 2006
  @@ -27,7 +27,7 @@
   # Uncomment if you want libpri to count number of Q921/Q931 sent/ 
received
   #LIBPRI_COUNTERS=-DLIBPRI_COUNTERS
@@ -18,7 +18,7 @@
   STATIC_OBJS=copy_string.o pri.o q921.o prisched.o q931.o  
pri_facility.o
   DYNAMIC_OBJS=copy_string.lo pri.lo q921.lo prisched.lo q931.lo  
pri_facility.lo
  -CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g $ 
(ALERTING) $(LIBPRI_COUNTERS)
--INSTALL_PREFIX?=
+-INSTALL_PREFIX=$(DESTDIR)
  -INSTALL_BASE=/usr
  -SOFLAGS = -Wl,-hlibpri.so.1.0
  +CFLAGS+=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g $ 
(ALERTING) $(LIBPRI_COUNTERS)
@@ -26,27 +26,30 @@
  +INSTALL_BASE=
  +SOFLAGS = -Wl,-hlibpri.so.1
   LDCONFIG = /sbin/ldconfig
- ifeq (${OSARCH},Linux)
+ ifneq (,$(findstring $(OSARCH), Linux GNU/kFreeBSD))
   LDCONFIG_FLAGS=-n
-@@ -84,12 +84,11 @@
- 	mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/lib
- 	mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/include
+@@ -81,15 +81,12 @@
+ 	fi
+
+ install: $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY)
+-	mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/lib
+-	mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/include
   ifneq (${OSARCH},SunOS)
  -	install -m 644 libpri.h $(INSTALL_PREFIX)$(INSTALL_BASE)/include
  -	install -m 755 $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$ 
(INSTALL_BASE)/lib
  -	if [ -x /usr/sbin/sestatus ] && ( /usr/sbin/sestatus | grep  
"SELinux status:" | grep -q "enabled"); then  restorecon -v $ 
(INSTALL_PREFIX)$(INSTALL_BASE)/lib/$(DYNAMIC_LIBRARY); fi
  -	( cd $(INSTALL_PREFIX)$(INSTALL_BASE)/lib ; ln -sf libpri.so.1.0  
libpri.so ; ln -sf libpri.so.1.0 libpri.so.1 )
  -	install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(INSTALL_BASE)/ 
lib
--	if test $$(id -u) = 0; then $(LDCONFIG); fi
+-	if test $$(id -u) = 0; then $(LDCONFIG) $(LDCONFIG_FLAGS) $ 
(INSTALL_PREFIX)$(INSTALL_BASE)/lib; fi
  +	echo installing libpri.h
-+	$(BSD_INSTALL_DATA) libpri.h $(INSTALL_PREFIX)/include
-+	$(BSD_INSTALL_PROGRAM) $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)/lib
-+	( cd $(INSTALL_PREFIX)/lib ; ln -sf libpri.so.1 libpri.so )
-+	$(BSD_INSTALL_DATA) $(STATIC_LIBRARY) $(INSTALL_PREFIX)/lib
++	$(BSD_INSTALL_DATA) libpri.h $(PREFIX)/include
++	$(BSD_INSTALL_PROGRAM) $(DYNAMIC_LIBRARY) $(PREFIX)/lib
++	( cd $(PREFIX)/lib ; ln -sf libpri.so.1 libpri.so )
++	$(BSD_INSTALL_DATA) $(STATIC_LIBRARY) $(PREFIX)/lib
   else
   	install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/include -m 644 libpri.h
   	install -f $(INSTALL_PREFIX)$(INSTALL_BASE)/lib -m 755 $ 
(DYNAMIC_LIBRARY)
-@@ -130,7 +129,6 @@
+@@ -130,7 +127,6 @@

   $(DYNAMIC_LIBRARY): $(DYNAMIC_OBJS)
   	$(CC) -shared $(SOFLAGS) -o $@ $(DYNAMIC_OBJS)

Now, for simplicities sake, move that /tmp/libpri.patch to /usr/ports/ 
misc.  You can run it directly from /tmp but I Don't know the patch  
switches to make that happen..

so, then you just cd /usr/ports/misc ; patch -p0 < libpri.patch

On 18-Jun-06, at 5:10 PM, Frank Griffith wrote:

> Okay gang, I'm getting jealous here....I'm not a programmer but I  
> can install Asterisk and get it configured well enough to impress  
> the decision makers at the office. However, I don't have the  
> slightest clue how to apply the patch. Can someone walk me through  
> it carefully....Remember you're dealing with the guy who's biggest  
> complaint about Unix advisors is that they explain steps 1 through  
> 3 just fine but then leave off steps 4 and 5 and only tell about  
> step 6 and 7 assuming every yahooo knows you're just supposed to do  
> steps 4 and 5 automatically.
>
> I got the build to work but only after I forced the Makefile to use  
> WITHOUT_ZAPTEL, WITHOUT_H323 and WITHOUT_FAX.
>
> And may I weigh in on the previous posts. I agree that until the  
> port can be installed by novices like me, Asterisk will remain out  
> of the reach of people who can really use it. This kind of stringy  
> process to build something is what makes the M$ guys at work tell  
> the bosses, "See I told you so..." whenever I try to get something  
> from the Open Source world working.
>
> Vahan Yerkanian <vahan at arminco.com> wrote:
> just upgraded using your patch, works flawlessly.
>
> Thomas Sandford wrote:
> > "Vahan Yerkanian" wrote:
> >
> >> What's the estimated timeframe for updating the misc/libpri port to
> >> 1.2.3 so we can have iax2 trunks etc with the asterisk 1.2.9.1  
> port?
> >>
> >> Currently you have to build with WITHOUT_ZAPTEL=yes to succeed  
> at all.
> >
> > See http://www.freebsd.org/cgi/query-pr.cgi?pr=98499
> >
> > I'll shortly start pushing for a maintainer timeout on this...
> >
> _______________________________________________
> Asterisk-BSD mailing list
> Asterisk-BSD at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-bsd
>
>
> Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low  
> rates.
> _______________________________________________
> Asterisk-BSD mailing list
> Asterisk-BSD at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-bsd



More information about the Asterisk-BSD mailing list