Skip to content

Commit

Permalink
update MacPorts
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Aug 29, 2023
1 parent 7182080 commit f3dd50c
Show file tree
Hide file tree
Showing 11 changed files with 233 additions and 73 deletions.
26 changes: 15 additions & 11 deletions tools/MacPorts/devel/gnutls/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ PortGroup legacysupport 1.0
PortGroup muniversal 1.0

name gnutls
version 3.7.9
revision 3
version 3.7.10
revision 0
categories devel security
# yes, some of the libs are GPL only
license LGPL-2.1+ GPL-3+
Expand All @@ -23,23 +23,27 @@ long_description \
Lesser General Public License (LGPL).
homepage http://www.gnutls.org/

checksums rmd160 0869a8d906afff9e3b28ceb9241cb7b53b464998 \
sha256 aaa03416cdbd54eb155187b359e3ec3ed52ec73df4df35a0edd49429ff64d844 \
size 6377212
checksums rmd160 e221dc4200d30b8644cfe1f2c8d5e7bccac8aca0 \
sha256 b6e4e8bac3a950a3a1b7bdb0904979d4ab420a81e74de8636dd50b467d36f5a9 \
size 6407852

subport ${name} {
conflicts ${name}-devel

patchfiles patch-lib-system-certs.c.old.diff
}

subport ${name}-devel {
conflicts ${name}

version 3.8.0
revision 1
version 3.8.1
revision 0

checksums rmd160 d9a09dec344ec897e7abaf408ba93e25e91ca2ad \
sha256 ba8b9e15ae20aba88f44661978f5b5863494316fe7e722ede9d069fe6294829c \
size 6447056

checksums rmd160 927aa3762946bcb3ef825832d7895f041e66a314 \
sha256 0ea0d11a1660a1e63f960f157b197abe6d0c8cb3255be24e1fb3815930b9bdc5 \
size 6378480
patchfiles patch-lib-system-certs.c.diff
}

if {${build_arch} ne "ppc" || ${build_arch} ne "ppc64"} {
Expand Down Expand Up @@ -77,7 +81,7 @@ depends_lib-append \
port:nettle \
port:zlib

patchfiles patch-lib-system-certs.c.diff \
patchfiles-append \
implicit.patch

post-patch {
Expand Down
26 changes: 15 additions & 11 deletions tools/MacPorts/devel/gnutls/Portfile.orig
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ PortGroup legacysupport 1.0
PortGroup muniversal 1.0

name gnutls
version 3.7.9
revision 3
version 3.7.10
revision 0
categories devel security
# yes, some of the libs are GPL only
license LGPL-2.1+ GPL-3+
Expand All @@ -23,23 +23,27 @@ long_description \
Lesser General Public License (LGPL).
homepage http://www.gnutls.org/

checksums rmd160 0869a8d906afff9e3b28ceb9241cb7b53b464998 \
sha256 aaa03416cdbd54eb155187b359e3ec3ed52ec73df4df35a0edd49429ff64d844 \
size 6377212
checksums rmd160 e221dc4200d30b8644cfe1f2c8d5e7bccac8aca0 \
sha256 b6e4e8bac3a950a3a1b7bdb0904979d4ab420a81e74de8636dd50b467d36f5a9 \
size 6407852

subport ${name} {
conflicts ${name}-devel

patchfiles patch-lib-system-certs.c.old.diff
}

subport ${name}-devel {
conflicts ${name}

version 3.8.0
revision 1
version 3.8.1
revision 0

checksums rmd160 d9a09dec344ec897e7abaf408ba93e25e91ca2ad \
sha256 ba8b9e15ae20aba88f44661978f5b5863494316fe7e722ede9d069fe6294829c \
size 6447056

checksums rmd160 927aa3762946bcb3ef825832d7895f041e66a314 \
sha256 0ea0d11a1660a1e63f960f157b197abe6d0c8cb3255be24e1fb3815930b9bdc5 \
size 6378480
patchfiles patch-lib-system-certs.c.diff
}

if {${build_arch} ne "ppc" || ${build_arch} ne "ppc64"} {
Expand Down Expand Up @@ -77,7 +81,7 @@ depends_lib-append \
port:nettle \
port:zlib

patchfiles patch-lib-system-certs.c.diff \
patchfiles-append \
implicit.patch

post-patch {
Expand Down
16 changes: 7 additions & 9 deletions tools/MacPorts/devel/gnutls/files/patch-lib-system-certs.c.diff
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
--- ./lib/system/certs.c.old 2017-04-14 10:36:27.000000000 -0700
+++ ./lib/system/certs.c 2017-04-14 10:37:10.000000000 -0700
@@ -47,8 +47,15 @@
--- lib/system/certs.c.orig 2023-08-04 01:20:32
+++ lib/system/certs.c 2023-08-11 05:05:09
@@ -47,7 +47,13 @@
#ifdef __APPLE__
# include <CoreFoundation/CoreFoundation.h>
# include <Security/Security.h>
#include <CoreFoundation/CoreFoundation.h>
#include <Security/Security.h>
+#ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
+#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
# include <Availability.h>
#include <Availability.h>
+#else
+# include <AvailabilityMacros.h>
+#endif
#endif
+#endif
+
#endif

/* System specific function wrappers for certificate stores.
*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--- ./lib/system/certs.c.old 2017-04-14 10:36:27.000000000 -0700
+++ ./lib/system/certs.c 2017-04-14 10:37:10.000000000 -0700
@@ -47,8 +47,15 @@
#ifdef __APPLE__
# include <CoreFoundation/CoreFoundation.h>
# include <Security/Security.h>
+#ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
+#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050
# include <Availability.h>
+#else
+# include <AvailabilityMacros.h>
+#endif
#endif
+#endif
+

/* System specific function wrappers for certificate stores.
*/
36 changes: 34 additions & 2 deletions tools/MacPorts/graphics/opencolorio/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,20 @@ configure.cxxflags-append \
-std=c++11

# see https://github.com/imageworks/OpenColorIO/issues/563
configure.cxxflags-append \
-Wno-error=self-assign-field
# https://trac.macports.org/ticket/67904
if {[string match *clang* ${configure.compiler}]} {
configure.cxxflags-append \
-Wno-error=self-assign-field
}

# src/core/ExponentOps.cpp: error: 'OpenColorIO::v1::{anonymous}::ExponentOp::~ExponentOp()'
# defined but not used [-Werror=unused-function]
# pyglue/PyAllocationTransform.cpp: error: cast between incompatible function types from 'PyObject* (*)(PyObject*)' \
# {aka '_object* (*)(_object*)'} to 'PyCFunction' {aka '_object* (*)(_object*, _object*)'} [-Werror=cast-function-type]
if {[string match *gcc* ${configure.compiler}]} {
configure.cxxflags-append \
-Wno-unused-function -Wno-cast-function-type
}

configure.cxxflags-append \
-Wno-deprecated-declarations
Expand All @@ -66,6 +78,12 @@ configure.args-append \
-DUSE_EXTERNAL_TINYXML=ON \
-DUSE_EXTERNAL_LCMS=ON

if {${configure.build_arch} in [list ppc ppc64]} {
# This option is ON by default:
configure.args-append \
-DOCIO_USE_SSE=OFF
}

# OpenColorIO intentially installs Python module in lib
# see https://github.com/imageworks/OpenColorIO/blob/15e96c1f579d3640947a5fcb5ec831383cc3956e/src/pyglue/CMakeLists.txt#L85

Expand Down Expand Up @@ -213,3 +231,17 @@ if {![variant_isset x11] && ![variant_isset quartz]} {
configure.args-append \
-DOCIO_BUILD_APPS=OFF
}

# Notice that on PowerPC tests will report a failure, however if you look into the actual output,
# almost all tests pass (with the fix for endianness above). What still fails is a result of OpenColorIO
# being incapable of properly handling rounding: FAILED: osvec[i] == PROFILE_OUTvec[i]
# values were 'luma: [0.212599993, 0.715200007, 0.0722000003]' and 'luma: [0.2126, 0.7152, 0.0722]'
variant tests description "Enable testing" {
configure.pre_args-replace \
-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
configure.args-append \
-DOCIO_BUILD_TESTS=ON

test.run yes
}
38 changes: 36 additions & 2 deletions tools/MacPorts/graphics/opencolorio/Portfile.orig
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ if {${os.platform} eq "darwin" && ${os.major} < 20} {

patchfiles-append patch-yaml-cpp-0.7.diff

patchfiles-append patch-fix-endianness.diff

patchfiles-append patch-CMakeLists.txt.diff

livecheck.type none
Expand All @@ -60,8 +62,20 @@ configure.cxxflags-append \
-std=c++11

# see https://github.com/imageworks/OpenColorIO/issues/563
configure.cxxflags-append \
-Wno-error=self-assign-field
# https://trac.macports.org/ticket/67904
if {[string match *clang* ${configure.compiler}]} {
configure.cxxflags-append \
-Wno-error=self-assign-field
}

# src/core/ExponentOps.cpp: error: 'OpenColorIO::v1::{anonymous}::ExponentOp::~ExponentOp()'
# defined but not used [-Werror=unused-function]
# pyglue/PyAllocationTransform.cpp: error: cast between incompatible function types from 'PyObject* (*)(PyObject*)' \
# {aka '_object* (*)(_object*)'} to 'PyCFunction' {aka '_object* (*)(_object*, _object*)'} [-Werror=cast-function-type]
if {[string match *gcc* ${configure.compiler}]} {
configure.cxxflags-append \
-Wno-unused-function -Wno-cast-function-type
}

configure.cxxflags-append \
-Wno-deprecated-declarations
Expand All @@ -83,6 +97,12 @@ configure.args-append \
-DUSE_EXTERNAL_TINYXML=ON \
-DUSE_EXTERNAL_LCMS=ON

if {${configure.build_arch} in [list ppc ppc64]} {
# This option is ON by default:
configure.args-append \
-DOCIO_USE_SSE=OFF
}

# OpenColorIO intentially installs Python module in lib
# see https://github.com/imageworks/OpenColorIO/blob/15e96c1f579d3640947a5fcb5ec831383cc3956e/src/pyglue/CMakeLists.txt#L85

Expand Down Expand Up @@ -222,3 +242,17 @@ if {![variant_isset x11] && ![variant_isset quartz]} {
configure.args-append \
-DOCIO_BUILD_APPS=OFF
}

# Notice that on PowerPC tests will report a failure, however if you look into the actual output,
# almost all tests pass (with the fix for endianness above). What still fails is a result of OpenColorIO
# being incapable of properly handling rounding: FAILED: osvec[i] == PROFILE_OUTvec[i]
# values were 'luma: [0.212599993, 0.715200007, 0.0722000003]' and 'luma: [0.2126, 0.7152, 0.0722]'
variant tests description "Enable testing" {
configure.pre_args-replace \
-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
configure.args-append \
-DOCIO_BUILD_TESTS=ON

test.run yes
}
35 changes: 19 additions & 16 deletions tools/MacPorts/graphics/opencolorio/Portfile.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- Portfile.orig 2023-08-10 18:32:48.000000000 +0200
+++ Portfile 2023-08-10 19:04:28.000000000 +0200
--- Portfile.orig 2023-08-29 21:57:17
+++ Portfile 2023-08-29 21:58:24
@@ -7,7 +7,7 @@

boost.depends_type build
Expand All @@ -22,7 +22,7 @@

# Exclude pre-releases from livecheck
github.livecheck.regex {([0-9.]+)}
@@ -31,28 +31,8 @@
@@ -31,31 +31,9 @@
configure.args-append \
-DCMAKE_CONFIGURATION_TYPES=MacPorts

Expand All @@ -31,7 +31,9 @@
-if {${os.platform} eq "darwin" && ${os.major} < 20} {
- github.setup AcademySoftwareFoundation OpenColorIO 1.1.1 v
- revision 3
-
+patchfiles-append \
+ patch-OCIOZArchive.diff

- checksums rmd160 81534822cb8350e1b7ba171c91226de996494d02 \
- sha256 b7def3b5383c9b35dc9c0bdd26da74e2199c2b283d52bb84847aa307f70a0bc4 \
- size 13830493
Expand All @@ -44,16 +46,17 @@
-
- patchfiles-append patch-yaml-cpp-0.7.diff
-
- patchfiles-append patch-fix-endianness.diff
-
- patchfiles-append patch-CMakeLists.txt.diff
-
- livecheck.type none
-}
+patchfiles-append \
+ patch-OCIOZArchive.diff

-
# source assumes C++11 compiler
compiler.cxx_standard 2011
@@ -79,6 +59,9 @@
configure.cxxflags-append \
@@ -93,6 +71,9 @@
port:tinyxml

configure.args-append \
Expand All @@ -63,7 +66,7 @@
-DUSE_EXTERNAL_YAML=ON \
-DUSE_EXTERNAL_TINYXML=ON \
-DUSE_EXTERNAL_LCMS=ON
@@ -87,8 +70,9 @@
@@ -107,8 +88,9 @@
# see https://github.com/imageworks/OpenColorIO/blob/15e96c1f579d3640947a5fcb5ec831383cc3956e/src/pyglue/CMakeLists.txt#L85

variant python27 description {Build the Python 2.7 bindings} conflicts python36 python37 python38 python39 python310 python311 {
Expand All @@ -74,7 +77,7 @@
-DPYTHON=${prefix}/bin/python2.7
post-destroot {
xinstall -d -m 0755 \
@@ -100,8 +84,9 @@
@@ -120,8 +102,9 @@
}

variant python36 description {Build the Python 3.6 bindings} conflicts python27 python37 python38 python39 python310 python311 {
Expand All @@ -85,7 +88,7 @@
-DPYTHON=${prefix}/bin/python3.6
post-destroot {
xinstall -d -m 0755 \
@@ -113,8 +98,9 @@
@@ -133,8 +116,9 @@
}

variant python37 description {Build the Python 3.7 bindings} conflicts python27 python36 python38 python39 python310 python311 {
Expand All @@ -96,7 +99,7 @@
-DPYTHON=${prefix}/bin/python3.7
post-destroot {
xinstall -d -m 0755 \
@@ -126,8 +112,9 @@
@@ -146,8 +130,9 @@
}

variant python38 description {Build the Python 3.8 bindings} conflicts python27 python36 python37 python39 python310 python311 {
Expand All @@ -107,7 +110,7 @@
-DPYTHON=${prefix}/bin/python3.8
post-destroot {
xinstall -d -m 0755 \
@@ -139,8 +126,9 @@
@@ -159,8 +144,9 @@
}

variant python39 description {Build the Python 3.9 bindings} conflicts python27 python36 python37 python38 python310 python311 {
Expand All @@ -118,7 +121,7 @@
-DPYTHON=${prefix}/bin/python3.9
post-destroot {
xinstall -d -m 0755 \
@@ -152,8 +140,9 @@
@@ -172,8 +158,9 @@
}

variant python310 description {Build the Python 3.10 bindings} conflicts python27 python36 python37 python38 python39 python311 {
Expand All @@ -129,7 +132,7 @@
-DPYTHON=${prefix}/bin/python3.10
post-destroot {
xinstall -d -m 0755 \
@@ -166,8 +155,9 @@
@@ -186,8 +173,9 @@


variant python311 description {Build the Python 3.11 bindings} conflicts python27 python36 python37 python38 python39 python310 {
Expand All @@ -140,7 +143,7 @@
-DPYTHON=${prefix}/bin/python3.11
post-destroot {
xinstall -d -m 0755 \
@@ -184,6 +174,7 @@
@@ -204,6 +192,7 @@

if {![variant_isset python27] && ![variant_isset python36] && ![variant_isset python37] && ![variant_isset python38] && ![variant_isset python39] && ![variant_isset python310] && ![variant_isset python311]} {
configure.args-append \
Expand Down

0 comments on commit f3dd50c

Please sign in to comment.