diff options
author | lioux <lioux@FreeBSD.org> | 2002-04-17 08:29:35 +0800 |
---|---|---|
committer | lioux <lioux@FreeBSD.org> | 2002-04-17 08:29:35 +0800 |
commit | 79be16447325c9cc6890416d794e6e31e690d68b (patch) | |
tree | 8b3614ddaa7328be94d55b53edee941cd3b161ed /graphics | |
parent | 3a1296a0b29456d56803ae5167286a23c32a2040 (diff) | |
download | freebsd-ports-gnome-79be16447325c9cc6890416d794e6e31e690d68b.tar.gz freebsd-ports-gnome-79be16447325c9cc6890416d794e6e31e690d68b.tar.zst freebsd-ports-gnome-79be16447325c9cc6890416d794e6e31e690d68b.zip |
o Add WITH_OPTIMIZED_BYTESWAP knob: to use optimized byteswap
routines. This works only in the i386 architecture but only with
486 processors and above.
o A trick to enable use of <machine/endian.h> kernel routines
Submitted by: eivind
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/ogle/Makefile | 14 | ||||
-rw-r--r-- | graphics/ogle/files/extra-patch-include:ogle_endian.h | 16 |
2 files changed, 29 insertions, 1 deletions
diff --git a/graphics/ogle/Makefile b/graphics/ogle/Makefile index c249c75a064c..84f135445d98 100644 --- a/graphics/ogle/Makefile +++ b/graphics/ogle/Makefile @@ -40,6 +40,12 @@ pre-everything:: @${ECHO_MSG} '===> Define WITH_DVD_DEVICE if you want to change the default' @${ECHO_MSG} "===> For example, 'make WITH_DVD_DEVICE=\"/dev/somedevice\"'" .endif +.ifndef(WITH_OPTIMIZED_BYTESWAP) + @${ECHO_MSG} '===>' + @${ECHO_MSG} '===> Define WITH_OPTIMIZED_BYTESWAP to use optimized byteswap' + @${ECHO_MSG} '===> routines. This works only in the i386 architecture but' + @${ECHO_MSG} '===> only with 486 processors and above.' +.endif post-patch: .ifdef(WITH_DVD_DEVICE) @@ -61,4 +67,10 @@ post-configure: post-install: @${CAT} ${PKGMESSAGE} -.include <bsd.port.mk> +.include <bsd.port.pre.mk> + +.if ${ARCH} == "i386" && defined(WITH_OPTIMIZED_BYTESWAP) +EXTRA_PATCHES= ${FILESDIR}/extra-patch-include:ogle_endian.h +.endif + +.include <bsd.port.post.mk> diff --git a/graphics/ogle/files/extra-patch-include:ogle_endian.h b/graphics/ogle/files/extra-patch-include:ogle_endian.h new file mode 100644 index 000000000000..4ac268a17041 --- /dev/null +++ b/graphics/ogle/files/extra-patch-include:ogle_endian.h @@ -0,0 +1,16 @@ +--- include/ogle_endian.h.orig Thu Oct 4 05:42:11 2001 ++++ include/ogle_endian.h Wed Apr 10 01:16:32 2002 +@@ -39,6 +39,13 @@ + #elif defined(HAVE_SYS_ENDIAN_H) + # include <sys/endian.h> + # define FROM_BE_32(x) (swap32(x)) ++#elif defined(__FreeBSD__) ++# define _KERNEL ++# define I486_CPU /* Will crash unless 486+ */ ++# include <machine/endian.h> ++# undef _KERNEL ++# undef I486_CPU ++# define FROM_BE_32(x) (ntohl(x)) + #else + # warning "No accelerated byte swap found. Using slow c version." + # include <inttypes.h> |