From dcabfa9719edb502800a1a6176ba56d197f98d86 Mon Sep 17 00:00:00 2001 From: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> Date: Thu, 11 Feb 2021 16:07:47 +0800 Subject: [PATCH] [gl2ps] update to 1.4.2 (#16134) * [gl2ps] update to 1.4.2 * update version --- ports/gl2ps/CONTROL | 2 +- ports/gl2ps/portfile.cmake | 8 +- .../gl2ps/separate-static-dynamic-build.patch | 164 +++++++++--------- versions/baseline.json | 2 +- versions/g-/gl2ps.json | 5 + 5 files changed, 90 insertions(+), 91 deletions(-) diff --git a/ports/gl2ps/CONTROL b/ports/gl2ps/CONTROL index deb9483aaf..8eab0c030d 100644 --- a/ports/gl2ps/CONTROL +++ b/ports/gl2ps/CONTROL @@ -1,5 +1,5 @@ Source: gl2ps -Version: 1.4.0-3 +Version: 1.4.2 Homepage: https://gitlab.onelab.info/gl2ps/gl2ps Description: OpenGL to PostScript Printing Library Build-Depends: freeglut, zlib, libpng diff --git a/ports/gl2ps/portfile.cmake b/ports/gl2ps/portfile.cmake index a66e1d2ffe..d18d2fcb4b 100644 --- a/ports/gl2ps/portfile.cmake +++ b/ports/gl2ps/portfile.cmake @@ -2,8 +2,8 @@ vcpkg_from_gitlab( GITLAB_URL http://gitlab.onelab.info OUT_SOURCE_PATH SOURCE_PATH REPO gl2ps/gl2ps - REF gl2ps_1_4_0 - SHA512 ee10e3fd312eae896934c39b8d115f28017874f918e4dd3350ca8f7cbf47dfc44101a5c6eb8826707620fcc336ca51ddc4eb7bf653af4b27651277625bac3cce + REF gl2ps_1_4_2 + SHA512 cb4abd79f6790e229a0b05a6d12e4bd4d24885c89c4cb8644e49b0459361565c5c5379b53d85f59eeaba16144d3288dbd06c90f55a739f0928a788224ccb8085 HEAD_REF master PATCHES separate-static-dynamic-build.patch ) @@ -17,5 +17,5 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING.GL2PS DESTINATION ${CURRENT_PACKAGES_DIR}/share/gl2ps RENAME copyright) -file(INSTALL ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/gl2ps RENAME copyright.LGPL) +file(INSTALL ${SOURCE_PATH}/COPYING.GL2PS DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright.LGPL) diff --git a/ports/gl2ps/separate-static-dynamic-build.patch b/ports/gl2ps/separate-static-dynamic-build.patch index fe2267e6aa..8bc8f29108 100644 --- a/ports/gl2ps/separate-static-dynamic-build.patch +++ b/ports/gl2ps/separate-static-dynamic-build.patch @@ -1,64 +1,61 @@ -diff --git "a/CMakeLists.txt" "b/CMakeLists.txt" -index 40da57e..39acf6b 100644 ---- "a/CMakeLists.txt" -+++ "b/CMakeLists.txt" -@@ -1,34 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0001c4f..36ec0f7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,33 +1,41 @@ # GL2PS, an OpenGL to PostScript Printing Library # Copyright (C) 1999-2017 C. Geuzaine --# -+# ++ + # # This program is free software; you can redistribute it and/or # modify it under the terms of either: --# -+# ++ + # # a) the GNU Library General Public License as published by the Free # Software Foundation, either version 2 of the License, or (at your # option) any later version; or --# -+# ++ + # # b) the GL2PS License as published by Christophe Geuzaine, either # version 2 of the License, or (at your option) any later version. --# -+# ++ + # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either # the GNU Library General Public License or the GL2PS License for # more details. --# -+# ++ + # # You should have received a copy of the GNU Library General Public # License along with this library in the file named "COPYING.LGPL"; # if not, write to the Free Software Foundation, Inc., 675 Mass Ave, # Cambridge, MA 02139, USA. --# -+# ++ + # # You should have received a copy of the GL2PS License with this # library in the file named "COPYING.GL2PS"; if not, I will be glad # to provide one. --# -+# ++ + # # For the latest info about gl2ps and a full list of contributors, # see http://www.geuz.org/gl2ps/. --# -+# ++ + # # Please report all bugs and problems to . - cmake_minimum_required(VERSION 2.4 FATAL_ERROR) -@@ -55,8 +55,8 @@ set(GL2PS_EXTRA_VERSION "" CACHE STRING "GL2PS extra version string") - set(GL2PS_VERSION "${GL2PS_MAJOR_VERSION}.${GL2PS_MINOR_VERSION}") +@@ -59,7 +67,7 @@ set(GL2PS_VERSION "${GL2PS_MAJOR_VERSION}.${GL2PS_MINOR_VERSION}") set(GL2PS_VERSION "${GL2PS_VERSION}.${GL2PS_PATCH_VERSION}${GL2PS_EXTRA_VERSION}") --execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE DATE + execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE DATE - OUTPUT_STRIP_TRAILING_WHITESPACE) -+execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE DATE +OUTPUT_STRIP_TRAILING_WHITESPACE) if(NOT DATE) set(DATE "unknown") - endif(NOT DATE) -@@ -113,84 +113,93 @@ endif(MATH_LIBRARY) - - include_directories(${EXTERNAL_INCLUDES}) + endif() +@@ -138,30 +146,30 @@ if(APPLE) + endif() + endif() -if(OPENGL_FOUND) - add_library(lib STATIC gl2ps.c gl2ps.h) @@ -66,17 +63,16 @@ index 40da57e..39acf6b 100644 - - add_library(shared SHARED gl2ps.c gl2ps.h) - target_link_libraries(shared ${EXTERNAL_LIBRARIES}) -- set_target_properties(shared PROPERTIES OUTPUT_NAME gl2ps) -- set_target_properties(shared PROPERTIES +- set_target_properties(shared PROPERTIES OUTPUT_NAME gl2ps - VERSION ${GL2PS_MAJOR_VERSION}.${GL2PS_MINOR_VERSION}.${GL2PS_PATCH_VERSION} - SOVERSION ${GL2PS_MAJOR_VERSION}) -- if(MSVC) -- set_target_properties(shared PROPERTIES COMPILE_FLAGS "-DGL2PSDLL -DGL2PSDLL_EXPORTS") -- endif(MSVC) -- -- install(TARGETS lib shared DESTINATION lib${LIB_SUFFIX}) --endif(OPENGL_FOUND) -+ +- if(WIN32 OR CYGWIN) +- set_target_properties(shared PROPERTIES +- COMPILE_FLAGS "-DGL2PSDLL -DGL2PSDLL_EXPORTS") +- endif() +- install(TARGETS lib shared RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib${LIB_SUFFIX} +- ARCHIVE DESTINATION lib${LIB_SUFFIX}) +add_library(gl2ps gl2ps.c gl2ps.h) +target_link_libraries(gl2ps ${EXTERNAL_LIBRARIES}) +set_target_properties(gl2ps PROPERTIES @@ -85,8 +81,8 @@ index 40da57e..39acf6b 100644 + +if(BUILD_SHARED_LIBS) + target_compile_definitions(gl2ps PRIVATE -DGL2PSDLL -DGL2PSDLL_EXPORTS) -+endif() -+ + endif() + +install( + TARGETS gl2ps + RUNTIME DESTINATION bin @@ -94,23 +90,45 @@ index 40da57e..39acf6b 100644 + ARCHIVE DESTINATION lib +) + - if(WIN32) - set(GL2PS_DOC .) + set(GL2PS_DOC share/gl2ps/docs) - else(WIN32) + else() set(GL2PS_DOC share/doc/gl2ps) - endif(WIN32) + endif() +if(NOT DISABLE_INSTALL_HEADERS) install(FILES gl2ps.h DESTINATION include) install(FILES ${CMAKE_SOURCE_DIR}/README.txt DESTINATION ${GL2PS_DOC}) install(FILES ${CMAKE_SOURCE_DIR}/COPYING.LGPL DESTINATION ${GL2PS_DOC}) - install(FILES ${CMAKE_SOURCE_DIR}/COPYING.GL2PS DESTINATION ${GL2PS_DOC}) +@@ -169,30 +177,36 @@ install(FILES ${CMAKE_SOURCE_DIR}/COPYING.GL2PS DESTINATION ${GL2PS_DOC}) install(FILES ${CMAKE_SOURCE_DIR}/gl2psTest.c DESTINATION ${GL2PS_DOC}) install(FILES ${CMAKE_SOURCE_DIR}/gl2psTestSimple.c DESTINATION ${GL2PS_DOC}) -+endif() -+ + +-if(GLUT_FOUND) +- add_executable(gl2psTest WIN32 gl2psTest.c) +- target_link_libraries(gl2psTest lib ${EXTERNAL_LIBRARIES}) +- add_executable(gl2psTestSimple WIN32 gl2psTestSimple.c) +- target_link_libraries(gl2psTestSimple lib ${EXTERNAL_LIBRARIES}) + endif() + +-find_package(LATEX) +-if(PDFLATEX_COMPILER) +- add_custom_command(OUTPUT gl2ps.pdf DEPENDS gl2ps.tex +- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex +- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex +- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex +- COMMAND ${CMAKE_COMMAND} -E copy gl2ps.pdf ${CMAKE_SOURCE_DIR}) +- add_custom_target(pdf ALL DEPENDS gl2ps.pdf) +- install(FILES gl2ps.pdf DESTINATION ${GL2PS_DOC}) +- find_program(TTH tth) +- if(TTH) +- add_custom_command(OUTPUT gl2ps.html DEPENDS gl2ps.tex gl2ps.pdf +- COMMAND ${CMAKE_COMMAND} -E copy_if_different +- ${CMAKE_SOURCE_DIR}/gl2ps.tex ${CMAKE_BINARY_DIR}/gl2ps.tex +- COMMAND ${TTH} ARGS -w1 gl2ps.tex) +- add_custom_target(html DEPENDS gl2ps.html) +- endif() +if(BUILD_TESTS) + + if(GLUT_FOUND) @@ -139,62 +157,38 @@ index 40da57e..39acf6b 100644 + endif(TTH) + endif(PDFLATEX_COMPILER) + -+endif() - --if(GLUT_FOUND) -- add_executable(gl2psTest WIN32 gl2psTest.c) -- target_link_libraries(gl2psTest lib ${EXTERNAL_LIBRARIES}) -- add_executable(gl2psTestSimple WIN32 gl2psTestSimple.c) -- target_link_libraries(gl2psTestSimple lib ${EXTERNAL_LIBRARIES}) --endif(GLUT_FOUND) -- --find_package(LATEX) --if(PDFLATEX_COMPILER) -- add_custom_command(OUTPUT gl2ps.pdf DEPENDS gl2ps.tex -- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex -- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex -- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex -- COMMAND ${CMAKE_COMMAND} -E copy gl2ps.pdf ${CMAKE_SOURCE_DIR}) -- add_custom_target(pdf ALL DEPENDS gl2ps.pdf) -- install(FILES gl2ps.pdf DESTINATION ${GL2PS_DOC}) -- find_program(TTH tth) -- if(TTH) -- add_custom_command(OUTPUT gl2ps.html DEPENDS gl2ps.tex gl2ps.pdf -- COMMAND ${CMAKE_COMMAND} -E copy_if_different -- ${CMAKE_SOURCE_DIR}/gl2ps.tex ${CMAKE_BINARY_DIR}/gl2ps.tex -- COMMAND ${TTH} ARGS -w1 gl2ps.tex) -- add_custom_target(html DEPENDS gl2ps.html) -- endif(TTH) --endif(PDFLATEX_COMPILER) + endif() set(CPACK_PACKAGE_VENDOR "Christophe Geuzaine") - set(CPACK_PACKAGE_VERSION_MAJOR ${GL2PS_MAJOR_VERSION}) - set(CPACK_PACKAGE_VERSION_MINOR ${GL2PS_MINOR_VERSION}) +@@ -201,27 +215,22 @@ set(CPACK_PACKAGE_VERSION_MINOR ${GL2PS_MINOR_VERSION}) set(CPACK_PACKAGE_VERSION_PATCH ${GL2PS_PATCH_VERSION}) set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/README.txt) --set(CPACK_PACKAGE_DESCRIPTION_SUMMARY + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY - "An OpenGL to PostScript (and PDF, and SVG...) printing library") --set(CPACK_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-${GL2PS_OS}) +-if(GL2PS_EXTRA_VERSION MATCHES "-git.*") # so that we'll overwrite the archives +- set(CPACK_PACKAGE_FILE_NAME gl2ps-git-${GL2PS_OS}) +- set(CPACK_SOURCE_PACKAGE_FILE_NAME gl2ps-git) +-else() ++ "An OpenGL to PostScript (and PDF, and SVG...) printing library") + set(CPACK_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-${GL2PS_OS}) +- set(CPACK_SOURCE_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}) +-endif() -set(CPACK_PACKAGE_INSTALL_DIRECTORY "gl2ps") -set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING.LGPL) -set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.txt) -set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README.txt) -set(CPACK_PACKAGE_EXECUTABLE "gl2ps;gl2ps") -set(CPACK_STRIP_FILES TRUE) --set(CPACK_SOURCE_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-source) -set(CPACK_SOURCE_GENERATOR TGZ) -set(CPACK_SOURCE_IGNORE_FILES "TODO.txt" "${CMAKE_BINARY_DIR}" "/CVS/" -- "/.svn" "~$" "DS_Store$" "/tmp/" "/bin/" "/lib/") +- "/.svn" "/.git" "~$" "DS_Store$" "/tmp/" "/bin/" "/lib/") -if(WIN32) - set(CPACK_GENERATOR ZIP) --else(WIN32) +-else() - set(CPACK_GENERATOR TGZ) --endif(WIN32) +-endif() - -include(CPack) -+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY -+ "An OpenGL to PostScript (and PDF, and SVG...) printing library") -+ set(CPACK_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-${GL2PS_OS}) + set(CPACK_PACKAGE_INSTALL_DIRECTORY "gl2ps") + set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING.LGPL) + set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.txt) diff --git a/versions/baseline.json b/versions/baseline.json index ba1e7e4e1c..fb2aac356a 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2181,7 +2181,7 @@ "port-version": 0 }, "gl2ps": { - "baseline": "1.4.0-3", + "baseline": "1.4.2", "port-version": 0 }, "gl3w": { diff --git a/versions/g-/gl2ps.json b/versions/g-/gl2ps.json index 06e08514f9..70a378c8bd 100644 --- a/versions/g-/gl2ps.json +++ b/versions/g-/gl2ps.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "4a2e08a33d47d51f58b41cd5659e632604ad560a", + "version-string": "1.4.2", + "port-version": 0 + }, { "git-tree": "2242a8c42e3e756657f4e149702de688f6b07e14", "version-string": "1.4.0-3",