diff --git a/graph/libjpeg/Makefile b/graph/libjpeg/Makefile index 080b5af6..d3861119 100644 --- a/graph/libjpeg/Makefile +++ b/graph/libjpeg/Makefile @@ -1,35 +1,30 @@ -# -# $Id: Makefile 1465 2007-11-19 23:38:41Z root $ -# +# Created by: Denis Podolskiy +# $FreeBSD: head/graphics/jpeg-turbo/Makefile 523792 2020-01-22 06:01:47Z antoine $ + PORTNAME= jpeg -PORTVERSION= 8.7 -CATEGORIES= graphics devel -MASTER_SITES= http://www.ijg.org/files/ -DISTNAME= ${PORTNAME}src.v${PORTVERSION:R}d -PKGNAMEPREFIX= lib - -MAINTAINER= onborodin@gmail.com -COMMENT= IJG's jpeg compression utilities - -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}d -GNU_CONFIGURE= yes -USES+= gmake -CONFIGURE_ARGS+= --enable-shared -CONFIGURE_ARGS+= --enable-static -INSTALLS_SHLIB= yes - -ADDITIONAL_HEADER= jinclude.h jpegint.h -J_MAXMEM=128 - -CONFIGURE_ARGS+= --enable-maxmem=${J_MAXMEM} +PORTVERSION= 8.${DISTVERSION} +DISTVERSION= 2.0.4 +CATEGORIES= graphics +MASTER_SITES= SF/lib${DISTNAME}/${PORTVERSION} +DISTNAME= lib${PORTNAME}-turbo-${DISTVERSION} +PKGNAMEPREFIX= lib -post-install: -.for header in ${ADDITIONAL_HEADER} - ${INSTALL_DATA} ${WRKSRC}/${header} ${STAGEDIR}${PREFIX}/include/ -.endfor +MAINTAINER= portmgr@FreeBSD.org +COMMENT?= SIMD-accelerated JPEG codec which replaces libjpeg + +USES= cmake gmake +USE_LDCONFIG= yes +CMAKE_ON+= WITH_JPEG8 +CMAKE_ARGS+= WITH_TURBOJPEG=ON +TEST_TARGET= test + +.include + +.if ${ARCH} == i386 || ${ARCH} == amd64 +BUILD_DEPENDS+= nasm:devel/nasm +.endif .include -#EOF diff --git a/graph/libjpeg/distinfo b/graph/libjpeg/distinfo index 78d154ab..1e9ecbbe 100644 --- a/graph/libjpeg/distinfo +++ b/graph/libjpeg/distinfo @@ -1,2 +1,3 @@ -SHA256 (jpegsrc.v8d.tar.gz) = 00029b1473f0f0ea72fbca3230e8cb25797fbb27e58ae2e46bb8bf5a806fe0b3 -SIZE (jpegsrc.v8d.tar.gz) = 991456 +TIMESTAMP = 1579127392 +SHA256 (libjpeg-turbo-2.0.4.tar.gz) = 33dd8547efd5543639e890efbf2ef52d5a21df81faf41bb940657af916a23406 +SIZE (libjpeg-turbo-2.0.4.tar.gz) = 2161812 diff --git a/graph/libjpeg/files/patch-x-CMakeLists.txt b/graph/libjpeg/files/patch-x-CMakeLists.txt new file mode 100644 index 00000000..d6151861 --- /dev/null +++ b/graph/libjpeg/files/patch-x-CMakeLists.txt @@ -0,0 +1,32 @@ +--- ./CMakeLists.txt.orig 2019-12-31 09:10:30.000000000 +0200 ++++ ./CMakeLists.txt 2020-03-10 10:22:34.313824000 +0200 +@@ -258,8 +258,10 @@ + if(JPEG_LIB_VERSION STREQUAL "62") + set(DEFAULT_SO_MAJOR_VERSION ${JPEG_LIB_VERSION}) + else() +- set(DEFAULT_SO_MAJOR_VERSION ${JPEG_LIB_VERSION_DIV10}) ++# set(DEFAULT_SO_MAJOR_VERSION ${JPEG_LIB_VERSION_DIV10}) ++ set(DEFAULT_SO_MAJOR_VERSION 12) + endif() ++ + if(JPEG_LIB_VERSION STREQUAL "80") + set(DEFAULT_SO_MINOR_VERSION 2) + else() +@@ -282,7 +284,7 @@ + "Minor version of the libjpeg API shared library (default: ${DEFAULT_SO_MINOR_VERSION})" + ${FORCE_SO_VERSION}) + +-set(JPEG_LIB_VERSION_DECIMAL "${JPEG_LIB_VERSION_DIV10}.${JPEG_LIB_VERSION_MOD10}") ++set(JPEG_LIB_VERSION_DECIMAL "${JPEG_LIB_VERSION_DIV10}") + message(STATUS "Emulating libjpeg API/ABI v${JPEG_LIB_VERSION_DECIMAL} (WITH_JPEG7 = ${WITH_JPEG7}, WITH_JPEG8 = ${WITH_JPEG8})") + message(STATUS "libjpeg API shared library version = ${SO_MAJOR_VERSION}.${SO_AGE}.${SO_MINOR_VERSION}") + +@@ -292,7 +294,7 @@ + # minor SO versions don't change. However, we increase the middle number (the + # SO "age") whenever functions are added to the API. + set(TURBOJPEG_SO_MAJOR_VERSION 0) +-set(TURBOJPEG_SO_VERSION 0.2.0) ++set(TURBOJPEG_SO_VERSION 0) + + + ############################################################################### diff --git a/graph/libjpeg/files/patch-x-libjpeg.map.in b/graph/libjpeg/files/patch-x-libjpeg.map.in new file mode 100644 index 00000000..f22813a4 --- /dev/null +++ b/graph/libjpeg/files/patch-x-libjpeg.map.in @@ -0,0 +1,11 @@ +--- ./libjpeg.map.in.orig 2019-12-31 09:10:30.000000000 +0200 ++++ ./libjpeg.map.in 2020-03-10 10:30:35.631754000 +0200 +@@ -5,7 +5,7 @@ + jconst_*; + }; + +-LIBJPEG_@JPEG_LIB_VERSION_DECIMAL@ { ++LIBJPEG_8.0 { + global: + *; + }; diff --git a/graph/libjpeg/files/patch-x-sharedlib-CMakeLists.txt b/graph/libjpeg/files/patch-x-sharedlib-CMakeLists.txt new file mode 100644 index 00000000..a39f41f5 --- /dev/null +++ b/graph/libjpeg/files/patch-x-sharedlib-CMakeLists.txt @@ -0,0 +1,11 @@ +--- ./sharedlib/CMakeLists.txt.orig 2019-12-31 09:10:30.000000000 +0200 ++++ ./sharedlib/CMakeLists.txt 2020-03-10 10:22:34.317697000 +0200 +@@ -39,7 +39,7 @@ + ${SIMD_OBJS}) + + set_target_properties(jpeg PROPERTIES SOVERSION ${SO_MAJOR_VERSION} +- VERSION ${SO_MAJOR_VERSION}.${SO_AGE}.${SO_MINOR_VERSION}) ++ VERSION ${SO_MAJOR_VERSION}) + if(APPLE AND (NOT CMAKE_OSX_DEPLOYMENT_TARGET OR + CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER 10.4)) + if(NOT CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG) diff --git a/graph/libjpeg/pkg-descr b/graph/libjpeg/pkg-descr index a804f2ad..b4a2d1e1 100644 --- a/graph/libjpeg/pkg-descr +++ b/graph/libjpeg/pkg-descr @@ -1,20 +1,20 @@ -The Independent JPEG Group's JPEG software -========================================== +This is a drop-in replacement for the graphics/jpeg library. It does not +include libturbojpeg.so (see graphics/libjpeg-turbo). -README for release 6 of 2-Aug-95 -================================ +libjpeg-turbo is a high-speed version of libjpeg for x86 and x86-64 processors +which uses SIMD instructions (MMX, SSE2, etc.) to accelerate baseline JPEG +compression and decompression. +libjpeg-turbo is generally 2-4x as fast as the unmodified version +of libjpeg, all else being equal. -This distribution contains the sixth public release of the Independent JPEG -Group's free JPEG software. You are welcome to redistribute this software and -to use it for any purpose, subject to the conditions under LEGAL ISSUES, below. +libjpeg-turbo was originally based on libjpeg/SIMD by Miyasaka Masaru, +but the TigerVNC and VirtualGL projects made numerous enhancements to the codec, +including improved support for Mac OS X, 64-bit support, +support for 32-bit and big endian pixel formats (RGBA, ABGR, etc.), +accelerated Huffman encoding/decoding, and various bug fixes. +The goal was to produce a fully open source codec that could replace +the partially closed source TurboJPEG/IPP codec used by VirtualGL and TurboVNC. +libjpeg-turbo generally achieves 80-120% of the performance of TurboJPEG/IPP. +It is faster in some areas but slower in others. -Serious users of this software (particularly those incorporating it into -larger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to -our electronic mailing list. Mailing list members are notified of updates -and have a chance to participate in technical discussions, etc. - -This software is the work of Tom Lane, Philip Gladstone, Luis Ortiz, Jim -Boucher, Lee Crocker, Julian Minguillon, George Phillips, Davide Rossi, -Ge' Weijers, and other members of the Independent JPEG Group. - -IJG is not affiliated with the official ISO JPEG standards committee. +WWW: http://libjpeg-turbo.virtualgl.org/ diff --git a/graph/libjpeg/pkg-plist b/graph/libjpeg/pkg-plist index 84f532ce..1062eee9 100644 --- a/graph/libjpeg/pkg-plist +++ b/graph/libjpeg/pkg-plist @@ -2,17 +2,21 @@ bin/cjpeg bin/djpeg bin/jpegtran bin/rdjpgcom +bin/tjbench bin/wrjpgcom include/jconfig.h include/jerror.h -include/jinclude.h include/jmorecfg.h -include/jpegint.h include/jpeglib.h +include/turbojpeg.h lib/libjpeg.a -lib/libjpeg.la lib/libjpeg.so lib/libjpeg.so.12 +lib/libturbojpeg.a +lib/libturbojpeg.so +lib/libturbojpeg.so.0 +lib/pkgconfig/libjpeg.pc +lib/pkgconfig/libturbojpeg.pc man/man1/cjpeg.1.gz man/man1/djpeg.1.gz man/man1/jpegtran.1.gz diff --git a/graph/libjpeg80/Makefile b/graph/libjpeg80/Makefile new file mode 100644 index 00000000..080b5af6 --- /dev/null +++ b/graph/libjpeg80/Makefile @@ -0,0 +1,35 @@ +# +# $Id: Makefile 1465 2007-11-19 23:38:41Z root $ +# +PORTNAME= jpeg +PORTVERSION= 8.7 +CATEGORIES= graphics devel +MASTER_SITES= http://www.ijg.org/files/ +DISTNAME= ${PORTNAME}src.v${PORTVERSION:R}d +PKGNAMEPREFIX= lib + +MAINTAINER= onborodin@gmail.com +COMMENT= IJG's jpeg compression utilities + +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}d +GNU_CONFIGURE= yes +USES+= gmake +CONFIGURE_ARGS+= --enable-shared +CONFIGURE_ARGS+= --enable-static +INSTALLS_SHLIB= yes + +ADDITIONAL_HEADER= jinclude.h jpegint.h +J_MAXMEM=128 + +CONFIGURE_ARGS+= --enable-maxmem=${J_MAXMEM} + + +post-install: +.for header in ${ADDITIONAL_HEADER} + ${INSTALL_DATA} ${WRKSRC}/${header} ${STAGEDIR}${PREFIX}/include/ +.endfor + + + +.include +#EOF diff --git a/graph/libjpeg80/distinfo b/graph/libjpeg80/distinfo new file mode 100644 index 00000000..78d154ab --- /dev/null +++ b/graph/libjpeg80/distinfo @@ -0,0 +1,2 @@ +SHA256 (jpegsrc.v8d.tar.gz) = 00029b1473f0f0ea72fbca3230e8cb25797fbb27e58ae2e46bb8bf5a806fe0b3 +SIZE (jpegsrc.v8d.tar.gz) = 991456 diff --git a/graph/libjpeg/files/_patch-djpeg.c b/graph/libjpeg80/files/_patch-djpeg.c similarity index 100% rename from graph/libjpeg/files/_patch-djpeg.c rename to graph/libjpeg80/files/_patch-djpeg.c diff --git a/graph/libjpeg/files/_patch-exifautotran b/graph/libjpeg80/files/_patch-exifautotran similarity index 100% rename from graph/libjpeg/files/_patch-exifautotran rename to graph/libjpeg80/files/_patch-exifautotran diff --git a/graph/libjpeg/files/patch-jconfig.cfg b/graph/libjpeg80/files/patch-jconfig.cfg similarity index 100% rename from graph/libjpeg/files/patch-jconfig.cfg rename to graph/libjpeg80/files/patch-jconfig.cfg diff --git a/graph/libjpeg/files/patch-jmorecfg.h b/graph/libjpeg80/files/patch-jmorecfg.h similarity index 100% rename from graph/libjpeg/files/patch-jmorecfg.h rename to graph/libjpeg80/files/patch-jmorecfg.h diff --git a/graph/libjpeg/files/patch-jpegtran.1 b/graph/libjpeg80/files/patch-jpegtran.1 similarity index 100% rename from graph/libjpeg/files/patch-jpegtran.1 rename to graph/libjpeg80/files/patch-jpegtran.1 diff --git a/graph/libjpeg/files/patch-jpegtran.c b/graph/libjpeg80/files/patch-jpegtran.c similarity index 100% rename from graph/libjpeg/files/patch-jpegtran.c rename to graph/libjpeg80/files/patch-jpegtran.c diff --git a/graph/libjpeg/files/patch-rdjpgcom.c b/graph/libjpeg80/files/patch-rdjpgcom.c similarity index 100% rename from graph/libjpeg/files/patch-rdjpgcom.c rename to graph/libjpeg80/files/patch-rdjpgcom.c diff --git a/graph/libjpeg/files/patch-transupp.c b/graph/libjpeg80/files/patch-transupp.c similarity index 100% rename from graph/libjpeg/files/patch-transupp.c rename to graph/libjpeg80/files/patch-transupp.c diff --git a/graph/libjpeg/files/patch-transupp.h b/graph/libjpeg80/files/patch-transupp.h similarity index 100% rename from graph/libjpeg/files/patch-transupp.h rename to graph/libjpeg80/files/patch-transupp.h diff --git a/graph/libjpeg80/pkg-descr b/graph/libjpeg80/pkg-descr new file mode 100644 index 00000000..a804f2ad --- /dev/null +++ b/graph/libjpeg80/pkg-descr @@ -0,0 +1,20 @@ +The Independent JPEG Group's JPEG software +========================================== + +README for release 6 of 2-Aug-95 +================================ + +This distribution contains the sixth public release of the Independent JPEG +Group's free JPEG software. You are welcome to redistribute this software and +to use it for any purpose, subject to the conditions under LEGAL ISSUES, below. + +Serious users of this software (particularly those incorporating it into +larger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to +our electronic mailing list. Mailing list members are notified of updates +and have a chance to participate in technical discussions, etc. + +This software is the work of Tom Lane, Philip Gladstone, Luis Ortiz, Jim +Boucher, Lee Crocker, Julian Minguillon, George Phillips, Davide Rossi, +Ge' Weijers, and other members of the Independent JPEG Group. + +IJG is not affiliated with the official ISO JPEG standards committee. diff --git a/graph/libjpeg80/pkg-plist b/graph/libjpeg80/pkg-plist new file mode 100644 index 00000000..84f532ce --- /dev/null +++ b/graph/libjpeg80/pkg-plist @@ -0,0 +1,20 @@ +bin/cjpeg +bin/djpeg +bin/jpegtran +bin/rdjpgcom +bin/wrjpgcom +include/jconfig.h +include/jerror.h +include/jinclude.h +include/jmorecfg.h +include/jpegint.h +include/jpeglib.h +lib/libjpeg.a +lib/libjpeg.la +lib/libjpeg.so +lib/libjpeg.so.12 +man/man1/cjpeg.1.gz +man/man1/djpeg.1.gz +man/man1/jpegtran.1.gz +man/man1/rdjpgcom.1.gz +man/man1/wrjpgcom.1.gz