From owner-dev-commits-ports-main@freebsd.org Thu Jun 10 14:47:27 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A46664CEBA; Thu, 10 Jun 2021 14:47:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G16JT0j7Rz4tgs; Thu, 10 Jun 2021 14:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27DC311765; Thu, 10 Jun 2021 14:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15AElJSu047482; Thu, 10 Jun 2021 14:47:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15AElJLc047481; Thu, 10 Jun 2021 14:47:19 GMT (envelope-from git) Date: Thu, 10 Jun 2021 14:47:19 GMT Message-Id: <202106101447.15AElJLc047481@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: c4ca0e58eece - main - graphics/gdal: Convert REINPLACE_CMD to patch files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c4ca0e58eececa5ee0fbea2c351844d03e2297c4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 14:47:28 -0000 The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=c4ca0e58eececa5ee0fbea2c351844d03e2297c4 commit c4ca0e58eececa5ee0fbea2c351844d03e2297c4 Author: Po-Chuan Hsieh AuthorDate: 2021-06-10 14:26:13 +0000 Commit: Po-Chuan Hsieh CommitDate: 2021-06-10 14:45:58 +0000 graphics/gdal: Convert REINPLACE_CMD to patch files --- graphics/gdal/Makefile | 4 -- graphics/gdal/files/patch-GDALmake.opt.in | 11 +++++ graphics/gdal/files/patch-GNUmakefile | 30 ++++++++++++ graphics/gdal/files/patch-configure | 57 ++++++++++++++++++++++ graphics/gdal/files/patch-frmts-pdf-pdfdataset.cpp | 20 ++++++++ graphics/gdal/files/patch-frmts-pdf-pdfobject.cpp | 20 ++++++++ 6 files changed, 138 insertions(+), 4 deletions(-) diff --git a/graphics/gdal/Makefile b/graphics/gdal/Makefile index dc230978f4f4..02dc636d898c 100644 --- a/graphics/gdal/Makefile +++ b/graphics/gdal/Makefile @@ -162,10 +162,6 @@ ZSTD_CONFIGURE_WITH= zstd ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd post-patch: - @${REINPLACE_CMD} -e '/^#GDAL_SLIB_SONAME/ s|^#||' ${WRKSRC}/GDALmake.opt.in - @${REINPLACE_CMD} -e 's|$$(INST_LIB)/pkgconfig|${PREFIX}/libdata/pkgconfig|; s| LICENSE.TXT||' ${WRKSRC}/GNUmakefile - @${REINPLACE_CMD} -e 's|-lminizip|-lkmlminizip|' -e 's|IlmImf|OpenEXR|g' ${WRKSRC}/configure - @${REINPLACE_CMD} -e 's|getCString()|c_str()|' ${WRKSRC}/frmts/pdf/pdfdataset.cpp ${WRKSRC}/frmts/pdf/pdfobject.cpp # Clean up bundled libraries @${RM} -r ${WRKSRC}/alg/internal_libqhull/ @${RM} -r ${WRKSRC}/frmts/gif/giflib/ diff --git a/graphics/gdal/files/patch-GDALmake.opt.in b/graphics/gdal/files/patch-GDALmake.opt.in new file mode 100644 index 000000000000..7db235d0d961 --- /dev/null +++ b/graphics/gdal/files/patch-GDALmake.opt.in @@ -0,0 +1,11 @@ +--- GDALmake.opt.in.orig 2021-04-27 09:10:56 UTC ++++ GDALmake.opt.in +@@ -141,7 +141,7 @@ GDAL_VERSION_REV = @GDAL_VERSION_REV@ + GDAL_LIB = $(GDAL_ROOT)/libgdal.a + GDAL_SLIB = $(GDAL_ROOT)/libgdal.$(SO_EXT) + GDAL_SLIB_LINK = -L$(GDAL_ROOT) -lgdal +-#GDAL_SLIB_SONAME = -Wl,-soname,libgdal.$(SO_EXT).@GDAL_VERSION_MAJOR@ ++GDAL_SLIB_SONAME = -Wl,-soname,libgdal.$(SO_EXT).@GDAL_VERSION_MAJOR@ + + # Mac OS X Framework definition + MACOSX_FRAMEWORK = @MACOSX_FRAMEWORK@ diff --git a/graphics/gdal/files/patch-GNUmakefile b/graphics/gdal/files/patch-GNUmakefile new file mode 100644 index 000000000000..fbdcee9f7a2a --- /dev/null +++ b/graphics/gdal/files/patch-GNUmakefile @@ -0,0 +1,30 @@ +--- GNUmakefile.orig 2021-04-27 09:10:56 UTC ++++ GNUmakefile +@@ -201,10 +201,10 @@ install-static-lib: static-lib gdal.pc + (cd alg; $(MAKE) install) + (cd ogr; $(MAKE) install) + (cd gnm; $(MAKE) install) +- for f in LICENSE.TXT data/*.* ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_DATA) ; done ++ for f in data/*.* ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_DATA) ; done + $(LIBTOOL_FINISH) $(DESTDIR)$(INST_LIB) +- $(INSTALL_DIR) $(DESTDIR)$(INST_LIB)/pkgconfig +- $(INSTALL_DATA) gdal.pc $(DESTDIR)$(INST_LIB)/pkgconfig/gdal.pc ++ $(INSTALL_DIR) $(DESTDIR)/usr/local/libdata/pkgconfig ++ $(INSTALL_DATA) gdal.pc $(DESTDIR)/usr/local/libdata/pkgconfig/gdal.pc + + install-actions: install-lib + $(INSTALL_DIR) $(DESTDIR)$(INST_BIN) +@@ -236,10 +236,10 @@ endif + ifdef INST_BASH_COMPLETION + (cd scripts; $(MAKE) install) + endif +- for f in LICENSE.TXT data/*.* ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_DATA) ; done ++ for f in data/*.* ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_DATA) ; done + $(LIBTOOL_FINISH) $(DESTDIR)$(INST_LIB) +- $(INSTALL_DIR) $(DESTDIR)$(INST_LIB)/pkgconfig +- $(INSTALL_DATA) gdal.pc $(DESTDIR)$(INST_LIB)/pkgconfig/gdal.pc ++ $(INSTALL_DIR) $(DESTDIR)/usr/local/libdata/pkgconfig ++ $(INSTALL_DATA) gdal.pc $(DESTDIR)/usr/local/libdata/pkgconfig/gdal.pc + + ifeq ($(HAVE_LIBTOOL),yes) + diff --git a/graphics/gdal/files/patch-configure b/graphics/gdal/files/patch-configure new file mode 100644 index 000000000000..0b6de58a0826 --- /dev/null +++ b/graphics/gdal/files/patch-configure @@ -0,0 +1,57 @@ +sed -e 's|-lminizip|-lkmlminizip|; s|IlmImf|OpenEXR|' configure + +--- configure.orig 2021-04-27 09:10:56 UTC ++++ configure +@@ -36668,9 +36668,9 @@ $as_echo "$LIBKML_VERSION" >&6; } + libkml_include_dir2="$libkml_prefix/include/kml" + libkml_include_dir3="$libkml_prefix/include/kml/third_party/boost_1_34_1" + if test "$libkml_prefix" = "/usr"; then +- libkml_lib_flags="-lkmldom -lkmlbase -lkmlengine -lkmlconvenience -lminizip -luriparser" ++ libkml_lib_flags="-lkmldom -lkmlbase -lkmlengine -lkmlconvenience -lkmlminizip -luriparser" + else +- libkml_lib_flags="-L$libkml_prefix/lib -lkmldom -lkmlbase -lkmlengine -lkmlconvenience -lminizip -luriparser" ++ libkml_lib_flags="-L$libkml_prefix/lib -lkmldom -lkmlbase -lkmlengine -lkmlconvenience -lkmlminizip -luriparser" + fi + run_libkml_test="yes" + elif test "$libkml_requested" = "yes"; then +@@ -42248,13 +42248,13 @@ fi + # Test that the package found is for the right architecture + saved_LIBS="$LIBS" + LIBS="$EXR_LIBS" +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ImfTiledInputReadTile in -lIlmImf" >&5 +-$as_echo_n "checking for ImfTiledInputReadTile in -lIlmImf... " >&6; } +-if ${ac_cv_lib_IlmImf_ImfTiledInputReadTile+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ImfTiledInputReadTile in -lOpenEXR" >&5 ++$as_echo_n "checking for ImfTiledInputReadTile in -lOpenEXR... " >&6; } ++if ${ac_cv_lib_OpenEXR_ImfTiledInputReadTile+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lIlmImf $LIBS" ++LIBS="-lOpenEXR $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -42274,17 +42274,17 @@ return ImfTiledInputReadTile (); + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_lib_IlmImf_ImfTiledInputReadTile=yes ++ ac_cv_lib_OpenEXR_ImfTiledInputReadTile=yes + else +- ac_cv_lib_IlmImf_ImfTiledInputReadTile=no ++ ac_cv_lib_OpenEXR_ImfTiledInputReadTile=no + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_IlmImf_ImfTiledInputReadTile" >&5 +-$as_echo "$ac_cv_lib_IlmImf_ImfTiledInputReadTile" >&6; } +-if test "x$ac_cv_lib_IlmImf_ImfTiledInputReadTile" = xyes; then : ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenEXR_ImfTiledInputReadTile" >&5 ++$as_echo "$ac_cv_lib_OpenEXR_ImfTiledInputReadTile" >&6; } ++if test "x$ac_cv_lib_OpenEXR_ImfTiledInputReadTile" = xyes; then : + HAVE_EXR=yes + else + HAVE_EXR=no diff --git a/graphics/gdal/files/patch-frmts-pdf-pdfdataset.cpp b/graphics/gdal/files/patch-frmts-pdf-pdfdataset.cpp new file mode 100644 index 000000000000..247bc4a4fdb0 --- /dev/null +++ b/graphics/gdal/files/patch-frmts-pdf-pdfdataset.cpp @@ -0,0 +1,20 @@ +--- frmts/pdf/pdfdataset.cpp.orig 2021-04-27 09:12:27 UTC ++++ frmts/pdf/pdfdataset.cpp +@@ -3584,7 +3584,7 @@ void PDFDataset::FindLayersPoppler() + #if (POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 72) + const char* pszLayerName = (const char*)ocg->getName()->c_str(); + #else +- const char* pszLayerName = (const char*)ocg->getName()->getCString(); ++ const char* pszLayerName = (const char*)ocg->getName()->c_str(); + #endif + AddLayer(pszLayerName); + oLayerOCGListPoppler.push_back(std::make_pair(CPLString(pszLayerName), ocg)); +@@ -4969,7 +4969,7 @@ PDFDataset *PDFDataset::Open( GDALOpenInfo * poOpenInf + #if (POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 72) + const char* pszContent = poMetadata->c_str(); + #else +- const char* pszContent = poMetadata->getCString(); ++ const char* pszContent = poMetadata->c_str(); + #endif + if (pszContent != nullptr && + STARTS_WITH(pszContent, "(gooString->c_str()), + static_cast(gooString->getLength()))); + #else +- return (osStr = GDALPDFGetUTF8StringFromBytes(reinterpret_cast(gooString->getCString()), ++ return (osStr = GDALPDFGetUTF8StringFromBytes(reinterpret_cast(gooString->c_str()), + static_cast(gooString->getLength()))); + #endif + } +@@ -1442,7 +1442,7 @@ static char* GooStringToCharStart(GooString& gstr) + #if (POPPLER_MAJOR_VERSION >= 1 || POPPLER_MINOR_VERSION >= 72) + const char* srcStr = gstr.c_str(); + #else +- const char* srcStr = gstr.getCString(); ++ const char* srcStr = gstr.c_str(); + #endif + memcpy(pszContent, srcStr, nLength); + pszContent[nLength] = '\0';