From ad0bbce2c7f4f333b6d68026dbaf6728c5022764 Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Fri, 5 Mar 2004 02:37:57 +0000 Subject: [PATCH] Allow pwlib to work on ARCHS != i386. Tested on alpha, i386, and ia64. Submitted by: marcel Approved by: maintainer (implicit) --- devel/pwlib/Makefile | 6 ++- devel/pwlib/files/patch-configurein | 45 +++++++++++-------- devel/pwlib/files/patch-makefile | 2 +- devel/pwlib/files/patch-videoio | 62 +++++++++++--------------- devel/pwlib/pkg-plist | 1 + devel/pwlib152/Makefile | 6 ++- devel/pwlib152/files/patch-configurein | 45 +++++++++++-------- devel/pwlib152/files/patch-makefile | 2 +- devel/pwlib152/files/patch-videoio | 62 +++++++++++--------------- devel/pwlib152/pkg-plist | 1 + 10 files changed, 118 insertions(+), 114 deletions(-) diff --git a/devel/pwlib/Makefile b/devel/pwlib/Makefile index a2b63e837dab..cc03accf7795 100644 --- a/devel/pwlib/Makefile +++ b/devel/pwlib/Makefile @@ -33,9 +33,13 @@ MAKE_ENV= PWLIBDIR=${WRKDIR}/pwlib THE_MACHTYPE= ${ARCH:S/i386/x86/} MAKE_ARGS= OSTYPE=${OPSYS} MACHTYPE=${THE_MACHTYPE} OSRELEASE=${OSVERSION} CPLUS=${CXX} +.include + +.if ${OSVERSION} < 502101 ONLY_FOR_ARCHS= i386 +.endif do-install: # ${INSTALL_PROGRAM} ${WRKSRC}/samples/simple/obj_${OPSYS}_${THE_MACHTYPE}_r/simph323 ${PREFIX}/bin -.include +.include diff --git a/devel/pwlib/files/patch-configurein b/devel/pwlib/files/patch-configurein index a53c4f7e9403..80c8ec813e73 100644 --- a/devel/pwlib/files/patch-configurein +++ b/devel/pwlib/files/patch-configurein @@ -1,19 +1,26 @@ -*** configure.in.orig Sun Aug 31 09:31:23 2003 ---- configure.in Sun Aug 31 09:31:50 2003 -*************** case "$target_os" in -*** 39,45 **** - STDCCFLAGS="-DP_LINUX=$OSRELEASE" ;; - - freebsd* ) OSTYPE=FreeBSD ; -! OSRELEASE=`sysctl -n kern.osreldate` ; - STDCCFLAGS="-DP_FREEBSD=$OSRELEASE" ;; - - openbsd* ) OSTYPE=OpenBSD ; ---- 39,45 ---- - STDCCFLAGS="-DP_LINUX=$OSRELEASE" ;; - - freebsd* ) OSTYPE=FreeBSD ; -! ## use enviroment variable OSRELEASE=`sysctl -n kern.osreldate` ; - STDCCFLAGS="-DP_FREEBSD=$OSRELEASE" ;; - - openbsd* ) OSTYPE=OpenBSD ; +--- configure.in.orig Thu May 22 05:19:16 2003 ++++ configure.in Sun Feb 15 23:57:20 2004 +@@ -39,7 +39,7 @@ + STDCCFLAGS="-DP_LINUX=$OSRELEASE" ;; + + freebsd* ) OSTYPE=FreeBSD ; +- OSRELEASE=`sysctl -n kern.osreldate` ; ++## use enviroment variable OSRELEASE=`sysctl -n kern.osreldate` ; + STDCCFLAGS="-DP_FREEBSD=$OSRELEASE" ;; + + openbsd* ) OSTYPE=OpenBSD ; +@@ -452,12 +452,13 @@ + dnl ######################################################################## + dnl check for video capture support. + dnl videodev.h on linux +-dnl machine/ioctl_meteor on FreeBSD ++dnl dev/bktr/ioctl_meteor or machine/ioctl_meteor on FreeBSD + dnl i386/ioctl_meteor on OpenBSD + dnl dev/ic/bt8xx on NetBSD + + HAS_VIDEO_CAPTURE=no + AC_CHECK_HEADER(linux/videodev.h, HAS_VIDEO_CAPTURE=yes) ++AC_CHECK_HEADER(dev/bktr/ioctl_meteor.h, HAS_VIDEO_CAPTURE=yes) + AC_CHECK_HEADER(machine/ioctl_meteor.h, HAS_VIDEO_CAPTURE=yes) + AC_CHECK_HEADER(i386/ioctl_meteor.h, HAS_VIDEO_CAPTURE=yes) + AC_CHECK_HEADER(dev/ic/bt8xx.h, HAS_VIDEO_CAPTURE=yes) diff --git a/devel/pwlib/files/patch-makefile b/devel/pwlib/files/patch-makefile index 8ca3ca5e99f7..1f7ea0dfcc56 100644 --- a/devel/pwlib/files/patch-makefile +++ b/devel/pwlib/files/patch-makefile @@ -6,7 +6,7 @@ endif ifeq ($(OSTYPE),FreeBSD) -+ ifneq (,$(wildcard $(SYSINCDIR)/machine/ioctl_meteor.h)) ++ ifneq (,$(wildcard $(SYSINCDIR)/dev/bktr/ioctl_meteor.h $(SYSINCDIR)/machine/ioctl_meteor.h)) VIDEO_CAPTURE_SOURCE = video4bsd.cxx + endif endif diff --git a/devel/pwlib/files/patch-videoio b/devel/pwlib/files/patch-videoio index 74d8a5c43c02..7e86b99f5bca 100644 --- a/devel/pwlib/files/patch-videoio +++ b/devel/pwlib/files/patch-videoio @@ -1,36 +1,26 @@ -*** include/ptlib/unix/ptlib/videoio.h.orig Mon Jan 6 18:41:08 2003 ---- include/ptlib/unix/ptlib/videoio.h Tue Dec 2 09:42:10 2003 -*************** -*** 106,112 **** - #include /* change this to "videodev2.h" for v4l2 */ - #endif - -! #if defined(P_FREEBSD) - #include - #endif - ---- 106,112 ---- - #include /* change this to "videodev2.h" for v4l2 */ - #endif - -! #if defined(P_FREEBSD) && !defined(NO_VIDEO_CAPTURE) - #include - #endif - -*************** -*** 186,192 **** - struct video_mmap frameBuffer[2]; - #endif - -! #if defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD) - struct video_capability - { - int channels; /* Num channels */ ---- 186,192 ---- - struct video_mmap frameBuffer[2]; - #endif - -! #if (defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD)) && !defined(NO_VIDEO_CAPTURE) - struct video_capability - { - int channels; /* Num channels */ +--- include/ptlib/unix/ptlib/videoio.h.orig Mon Jan 6 10:41:08 2003 ++++ include/ptlib/unix/ptlib/videoio.h Sun Feb 15 23:42:39 2004 +@@ -106,9 +106,13 @@ + #include /* change this to "videodev2.h" for v4l2 */ + #endif + +-#if defined(P_FREEBSD) ++#if defined(P_FREEBSD) && !defined(NO_VIDEO_CAPTURE) ++#if P_FREEBSD >= 502101 ++#include ++#else + #include + #endif ++#endif + + #if defined(P_OPENBSD) || defined(P_NETBSD) + #if P_OPENBSD >= 200105 +@@ -186,7 +190,7 @@ + struct video_mmap frameBuffer[2]; + #endif + +-#if defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD) ++#if (defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD)) && !defined(NO_VIDEO_CAPTURE) + struct video_capability + { + int channels; /* Num channels */ diff --git a/devel/pwlib/pkg-plist b/devel/pwlib/pkg-plist index e69de29bb2d1..549a621fec0c 100644 --- a/devel/pwlib/pkg-plist +++ b/devel/pwlib/pkg-plist @@ -0,0 +1 @@ +@comment this plist intentionally left empty diff --git a/devel/pwlib152/Makefile b/devel/pwlib152/Makefile index a2b63e837dab..cc03accf7795 100644 --- a/devel/pwlib152/Makefile +++ b/devel/pwlib152/Makefile @@ -33,9 +33,13 @@ MAKE_ENV= PWLIBDIR=${WRKDIR}/pwlib THE_MACHTYPE= ${ARCH:S/i386/x86/} MAKE_ARGS= OSTYPE=${OPSYS} MACHTYPE=${THE_MACHTYPE} OSRELEASE=${OSVERSION} CPLUS=${CXX} +.include + +.if ${OSVERSION} < 502101 ONLY_FOR_ARCHS= i386 +.endif do-install: # ${INSTALL_PROGRAM} ${WRKSRC}/samples/simple/obj_${OPSYS}_${THE_MACHTYPE}_r/simph323 ${PREFIX}/bin -.include +.include diff --git a/devel/pwlib152/files/patch-configurein b/devel/pwlib152/files/patch-configurein index a53c4f7e9403..80c8ec813e73 100644 --- a/devel/pwlib152/files/patch-configurein +++ b/devel/pwlib152/files/patch-configurein @@ -1,19 +1,26 @@ -*** configure.in.orig Sun Aug 31 09:31:23 2003 ---- configure.in Sun Aug 31 09:31:50 2003 -*************** case "$target_os" in -*** 39,45 **** - STDCCFLAGS="-DP_LINUX=$OSRELEASE" ;; - - freebsd* ) OSTYPE=FreeBSD ; -! OSRELEASE=`sysctl -n kern.osreldate` ; - STDCCFLAGS="-DP_FREEBSD=$OSRELEASE" ;; - - openbsd* ) OSTYPE=OpenBSD ; ---- 39,45 ---- - STDCCFLAGS="-DP_LINUX=$OSRELEASE" ;; - - freebsd* ) OSTYPE=FreeBSD ; -! ## use enviroment variable OSRELEASE=`sysctl -n kern.osreldate` ; - STDCCFLAGS="-DP_FREEBSD=$OSRELEASE" ;; - - openbsd* ) OSTYPE=OpenBSD ; +--- configure.in.orig Thu May 22 05:19:16 2003 ++++ configure.in Sun Feb 15 23:57:20 2004 +@@ -39,7 +39,7 @@ + STDCCFLAGS="-DP_LINUX=$OSRELEASE" ;; + + freebsd* ) OSTYPE=FreeBSD ; +- OSRELEASE=`sysctl -n kern.osreldate` ; ++## use enviroment variable OSRELEASE=`sysctl -n kern.osreldate` ; + STDCCFLAGS="-DP_FREEBSD=$OSRELEASE" ;; + + openbsd* ) OSTYPE=OpenBSD ; +@@ -452,12 +452,13 @@ + dnl ######################################################################## + dnl check for video capture support. + dnl videodev.h on linux +-dnl machine/ioctl_meteor on FreeBSD ++dnl dev/bktr/ioctl_meteor or machine/ioctl_meteor on FreeBSD + dnl i386/ioctl_meteor on OpenBSD + dnl dev/ic/bt8xx on NetBSD + + HAS_VIDEO_CAPTURE=no + AC_CHECK_HEADER(linux/videodev.h, HAS_VIDEO_CAPTURE=yes) ++AC_CHECK_HEADER(dev/bktr/ioctl_meteor.h, HAS_VIDEO_CAPTURE=yes) + AC_CHECK_HEADER(machine/ioctl_meteor.h, HAS_VIDEO_CAPTURE=yes) + AC_CHECK_HEADER(i386/ioctl_meteor.h, HAS_VIDEO_CAPTURE=yes) + AC_CHECK_HEADER(dev/ic/bt8xx.h, HAS_VIDEO_CAPTURE=yes) diff --git a/devel/pwlib152/files/patch-makefile b/devel/pwlib152/files/patch-makefile index 8ca3ca5e99f7..1f7ea0dfcc56 100644 --- a/devel/pwlib152/files/patch-makefile +++ b/devel/pwlib152/files/patch-makefile @@ -6,7 +6,7 @@ endif ifeq ($(OSTYPE),FreeBSD) -+ ifneq (,$(wildcard $(SYSINCDIR)/machine/ioctl_meteor.h)) ++ ifneq (,$(wildcard $(SYSINCDIR)/dev/bktr/ioctl_meteor.h $(SYSINCDIR)/machine/ioctl_meteor.h)) VIDEO_CAPTURE_SOURCE = video4bsd.cxx + endif endif diff --git a/devel/pwlib152/files/patch-videoio b/devel/pwlib152/files/patch-videoio index 74d8a5c43c02..7e86b99f5bca 100644 --- a/devel/pwlib152/files/patch-videoio +++ b/devel/pwlib152/files/patch-videoio @@ -1,36 +1,26 @@ -*** include/ptlib/unix/ptlib/videoio.h.orig Mon Jan 6 18:41:08 2003 ---- include/ptlib/unix/ptlib/videoio.h Tue Dec 2 09:42:10 2003 -*************** -*** 106,112 **** - #include /* change this to "videodev2.h" for v4l2 */ - #endif - -! #if defined(P_FREEBSD) - #include - #endif - ---- 106,112 ---- - #include /* change this to "videodev2.h" for v4l2 */ - #endif - -! #if defined(P_FREEBSD) && !defined(NO_VIDEO_CAPTURE) - #include - #endif - -*************** -*** 186,192 **** - struct video_mmap frameBuffer[2]; - #endif - -! #if defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD) - struct video_capability - { - int channels; /* Num channels */ ---- 186,192 ---- - struct video_mmap frameBuffer[2]; - #endif - -! #if (defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD)) && !defined(NO_VIDEO_CAPTURE) - struct video_capability - { - int channels; /* Num channels */ +--- include/ptlib/unix/ptlib/videoio.h.orig Mon Jan 6 10:41:08 2003 ++++ include/ptlib/unix/ptlib/videoio.h Sun Feb 15 23:42:39 2004 +@@ -106,9 +106,13 @@ + #include /* change this to "videodev2.h" for v4l2 */ + #endif + +-#if defined(P_FREEBSD) ++#if defined(P_FREEBSD) && !defined(NO_VIDEO_CAPTURE) ++#if P_FREEBSD >= 502101 ++#include ++#else + #include + #endif ++#endif + + #if defined(P_OPENBSD) || defined(P_NETBSD) + #if P_OPENBSD >= 200105 +@@ -186,7 +190,7 @@ + struct video_mmap frameBuffer[2]; + #endif + +-#if defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD) ++#if (defined(P_FREEBSD) || defined(P_OPENBSD) || defined(P_NETBSD)) && !defined(NO_VIDEO_CAPTURE) + struct video_capability + { + int channels; /* Num channels */ diff --git a/devel/pwlib152/pkg-plist b/devel/pwlib152/pkg-plist index e69de29bb2d1..549a621fec0c 100644 --- a/devel/pwlib152/pkg-plist +++ b/devel/pwlib152/pkg-plist @@ -0,0 +1 @@ +@comment this plist intentionally left empty