From d00318fa1b86ca37f896672e185768e3ab4b3e79 Mon Sep 17 00:00:00 2001 From: Alison Watson Date: Wed, 30 Oct 2019 10:55:49 -0400 Subject: [PATCH] add ericw-tools template --- TODO | 2 - .../ericw-tools/patches/cmake-bspinfo.diff | 19 +++++ .../ericw-tools/patches/cmake-bsputil.diff | 19 +++++ srcpkgs/ericw-tools/patches/cmake-light.diff | 70 +++++++++++++++++++ srcpkgs/ericw-tools/patches/cmake-main.diff | 21 ++++++ srcpkgs/ericw-tools/patches/cmake-man.diff | 26 +++++++ srcpkgs/ericw-tools/patches/cmake-qbsp.diff | 18 +++++ srcpkgs/ericw-tools/patches/cmake-vis.diff | 24 +++++++ srcpkgs/ericw-tools/patches/man-bspinfo.diff | 24 +++++++ srcpkgs/ericw-tools/patches/man-bsputil.diff | 24 +++++++ srcpkgs/ericw-tools/patches/man-light.diff | 33 +++++++++ srcpkgs/ericw-tools/patches/man-qbsp.diff | 26 +++++++ srcpkgs/ericw-tools/patches/man-vis.diff | 24 +++++++ srcpkgs/ericw-tools/template | 22 ++++++ 14 files changed, 350 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/ericw-tools/patches/cmake-bspinfo.diff create mode 100644 srcpkgs/ericw-tools/patches/cmake-bsputil.diff create mode 100644 srcpkgs/ericw-tools/patches/cmake-light.diff create mode 100644 srcpkgs/ericw-tools/patches/cmake-main.diff create mode 100644 srcpkgs/ericw-tools/patches/cmake-man.diff create mode 100644 srcpkgs/ericw-tools/patches/cmake-qbsp.diff create mode 100644 srcpkgs/ericw-tools/patches/cmake-vis.diff create mode 100644 srcpkgs/ericw-tools/patches/man-bspinfo.diff create mode 100644 srcpkgs/ericw-tools/patches/man-bsputil.diff create mode 100644 srcpkgs/ericw-tools/patches/man-light.diff create mode 100644 srcpkgs/ericw-tools/patches/man-qbsp.diff create mode 100644 srcpkgs/ericw-tools/patches/man-vis.diff create mode 100644 srcpkgs/ericw-tools/template diff --git a/TODO b/TODO index f399320..bffcbed 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,5 @@ bsnes-plus cc65 -crosstool-ng-git -ericw-tools gdcc-git gitahead gmqcc-git diff --git a/srcpkgs/ericw-tools/patches/cmake-bspinfo.diff b/srcpkgs/ericw-tools/patches/cmake-bspinfo.diff new file mode 100644 index 0000000..5f15d61 --- /dev/null +++ b/srcpkgs/ericw-tools/patches/cmake-bspinfo.diff @@ -0,0 +1,19 @@ +--- bspinfo/CMakeLists.txt.orig 2019-03-25 22:56:31.000000000 -0400 ++++ bspinfo/CMakeLists.txt 2019-10-30 10:43:22.239319994 -0400 +@@ -1,5 +1,5 @@ + cmake_minimum_required (VERSION 2.8) +-project (bspinfo CXX) ++project (ericw-bspinfo CXX) + + set(BSPINFO_SOURCES + bspinfo.cc +@@ -9,6 +9,6 @@ + ${CMAKE_SOURCE_DIR}/common/threads.cc + ${COMMON_INCLUDES}) + +-add_executable(bspinfo ${BSPINFO_SOURCES}) +-target_link_libraries(bspinfo ${CMAKE_THREAD_LIBS_INIT}) +-install(TARGETS bspinfo RUNTIME DESTINATION bin) ++add_executable(ericw-bspinfo ${BSPINFO_SOURCES}) ++target_link_libraries(ericw-bspinfo ${CMAKE_THREAD_LIBS_INIT}) ++install(TARGETS ericw-bspinfo RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/srcpkgs/ericw-tools/patches/cmake-bsputil.diff b/srcpkgs/ericw-tools/patches/cmake-bsputil.diff new file mode 100644 index 0000000..127bfaa --- /dev/null +++ b/srcpkgs/ericw-tools/patches/cmake-bsputil.diff @@ -0,0 +1,19 @@ +--- bsputil/CMakeLists.txt.orig 2019-03-25 22:56:31.000000000 -0400 ++++ bsputil/CMakeLists.txt 2019-10-30 10:42:20.137343889 -0400 +@@ -1,5 +1,5 @@ + cmake_minimum_required (VERSION 2.8) +-project (bsputil CXX) ++project (ericw-bsputil CXX) + + set(BSPUTIL_SOURCES + bsputil.cc +@@ -13,6 +13,6 @@ + ${CMAKE_SOURCE_DIR}/common/threads.cc + ${COMMON_INCLUDES}) + +-add_executable(bsputil ${BSPUTIL_SOURCES}) +-target_link_libraries(bsputil ${CMAKE_THREAD_LIBS_INIT}) +-install(TARGETS bsputil RUNTIME DESTINATION bin) ++add_executable(ericw-bsputil ${BSPUTIL_SOURCES}) ++target_link_libraries(ericw-bsputil ${CMAKE_THREAD_LIBS_INIT}) ++install(TARGETS ericw-bsputil RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/srcpkgs/ericw-tools/patches/cmake-light.diff b/srcpkgs/ericw-tools/patches/cmake-light.diff new file mode 100644 index 0000000..02e533a --- /dev/null +++ b/srcpkgs/ericw-tools/patches/cmake-light.diff @@ -0,0 +1,70 @@ +--- light/CMakeLists.txt.orig 2019-03-25 22:56:31.000000000 -0400 ++++ light/CMakeLists.txt 2019-10-30 10:34:54.952515183 -0400 +@@ -1,5 +1,5 @@ + cmake_minimum_required (VERSION 2.8) +-project (light CXX) ++project (ericw-light CXX) + + set(LIGHT_INCLUDES + ${CMAKE_SOURCE_DIR}/include/light/imglib.hh +@@ -49,18 +49,13 @@ + trace_embree.cc + ${CMAKE_SOURCE_DIR}/include/light/trace_embree.hh + ${LIGHT_SOURCES}) +- +- # This needs to be before the add_executable +- if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") +- SET(CMAKE_INSTALL_RPATH "$ORIGIN") +- endif () + endif(embree_FOUND) + +-add_executable(light ${LIGHT_SOURCES} main.cc) +-target_link_libraries (light ${CMAKE_THREAD_LIBS_INIT}) ++add_executable(ericw-light ${LIGHT_SOURCES} main.cc) ++target_link_libraries (ericw-light ${CMAKE_THREAD_LIBS_INIT}) + + if (embree_FOUND) +- target_link_libraries (light ${EMBREE_LIBRARY}) ++ target_link_libraries (ericw-light ${EMBREE_LIBRARY}) + add_definitions(-DHAVE_EMBREE) + + set(EMBREE_LICENSE "${embree_DIR}/doc/LICENSE.txt") +@@ -68,10 +63,10 @@ + if(WIN32) + file(GLOB EMBREE_DLLS "${embree_DIR}/bin/*.dll") + foreach(EMBREE_DLL ${EMBREE_DLLS}) +- add_custom_command(TARGET light POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${EMBREE_DLL} $) ++ add_custom_command(TARGET ericw-light POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${EMBREE_DLL} $) + endforeach(EMBREE_DLL) + +- add_custom_command(TARGET light POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${EMBREE_LICENSE} $/LICENSE-embree.txt) ++ add_custom_command(TARGET ericw-light POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${EMBREE_LICENSE} $/LICENSE-embree.txt) + + install(FILES ${EMBREE_DLLS} DESTINATION bin) + endif() +@@ -96,22 +91,17 @@ + + foreach(EMBREE_DYLIB ${EMBREE_DYLIBS}) + message(STATUS "Copying dylib: ${EMBREE_DYLIB}") +- add_custom_command(TARGET light POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${EMBREE_DYLIB} $) ++ add_custom_command(TARGET ericw-light POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${EMBREE_DYLIB} $) + endforeach() + + # so the executable will search for dylib's in the same directory as the executable + if(APPLE) +- add_custom_command(TARGET light POST_BUILD COMMAND bash ARGS -c \"install_name_tool -add_rpath @loader_path $ || true\") ++ add_custom_command(TARGET ericw-light POST_BUILD COMMAND bash ARGS -c \"install_name_tool -add_rpath @loader_path $ || true\") + endif() +- +- install(FILES ${EMBREE_DYLIBS} DESTINATION bin) + endif() +- +- install(FILES ${EMBREE_LICENSE} DESTINATION bin RENAME LICENSE-embree.txt) + endif(embree_FOUND) + +-install(TARGETS light RUNTIME DESTINATION bin) +-install(FILES ${CMAKE_SOURCE_DIR}/gpl_v3.txt DESTINATION bin) ++install(TARGETS ericw-light RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + # test + diff --git a/srcpkgs/ericw-tools/patches/cmake-main.diff b/srcpkgs/ericw-tools/patches/cmake-main.diff new file mode 100644 index 0000000..d511ea9 --- /dev/null +++ b/srcpkgs/ericw-tools/patches/cmake-main.diff @@ -0,0 +1,21 @@ +--- CMakeLists.txt.orig 2019-03-25 22:56:31.000000000 -0400 ++++ CMakeLists.txt 2019-10-30 10:51:45.883126206 -0400 +@@ -1,6 +1,8 @@ + cmake_minimum_required (VERSION 2.8) + project (ericw-tools) + ++include(GNUInstallDirs) ++ + # Grab the git describe output and store it in GIT_DESCRIBE + # Thanks to http://xit0.org/2013/04/cmake-use-git-branch-and-commit-details-in-project/ + execute_process( +@@ -134,9 +136,6 @@ + add_subdirectory(vis) + add_subdirectory(man) + +-install(FILES README.md DESTINATION bin) +-install(FILES changelog.txt DESTINATION bin) +- + #CPack configuration + + set(CPACK_GENERATOR ZIP) diff --git a/srcpkgs/ericw-tools/patches/cmake-man.diff b/srcpkgs/ericw-tools/patches/cmake-man.diff new file mode 100644 index 0000000..2b9abbe --- /dev/null +++ b/srcpkgs/ericw-tools/patches/cmake-man.diff @@ -0,0 +1,26 @@ +--- man/CMakeLists.txt.orig 2019-03-25 22:56:31.000000000 -0400 ++++ man/CMakeLists.txt 2019-10-30 10:40:52.786377499 -0400 +@@ -4,19 +4,15 @@ + find_program (GROFF groff) + + if(GROFF) +- set(MANPAGES qbsp vis light bsputil bspinfo) ++ set(MANPAGES ericw-qbsp ericw-vis ericw-light ericw-bsputil ericw-bspinfo) + foreach(MANPAGE ${MANPAGES}) + add_custom_command( + OUTPUT ${MANPAGE}.html + COMMAND ${GROFF} -Thtml -man ${CMAKE_SOURCE_DIR}/man/${MANPAGE}.1 > ${MANPAGE}.html + ) + add_custom_target(man_${MANPAGE} DEPENDS ${MANPAGE}.html) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE}.html DESTINATION doc) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE}.html DESTINATION ${CMAKE_INSTALL_DATADIR}/doc) ++ install(FILES ${MANPAGE}.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) ++ add_dependencies(${MANPAGE} man_${MANPAGE}) + endforeach() +- #make each of the main targets depend on the manuals +- add_dependencies(qbsp man_qbsp) +- add_dependencies(vis man_vis) +- add_dependencies(light man_light) +- add_dependencies(bsputil man_bsputil) +- add_dependencies(bspinfo man_bspinfo) + endif(GROFF) diff --git a/srcpkgs/ericw-tools/patches/cmake-qbsp.diff b/srcpkgs/ericw-tools/patches/cmake-qbsp.diff new file mode 100644 index 0000000..3658b04 --- /dev/null +++ b/srcpkgs/ericw-tools/patches/cmake-qbsp.diff @@ -0,0 +1,18 @@ +--- qbsp/CMakeLists.txt.orig 2019-03-25 22:56:31.000000000 -0400 ++++ qbsp/CMakeLists.txt 2019-10-30 10:31:31.470593481 -0400 +@@ -1,11 +1,11 @@ + cmake_minimum_required (VERSION 2.8) +-project (qbsp CXX) ++project (ericw-qbsp CXX) + + add_definitions(-DDOUBLEVEC_T) + +-add_executable(qbsp ${QBSP_SOURCES} main.cc) +-target_link_libraries(qbsp ${CMAKE_THREAD_LIBS_INIT}) +-install(TARGETS qbsp RUNTIME DESTINATION bin) ++add_executable(ericw-qbsp ${QBSP_SOURCES} main.cc) ++target_link_libraries(ericw-qbsp ${CMAKE_THREAD_LIBS_INIT}) ++install(TARGETS ericw-qbsp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + # test (copied from light/CMakeLists.txt) + diff --git a/srcpkgs/ericw-tools/patches/cmake-vis.diff b/srcpkgs/ericw-tools/patches/cmake-vis.diff new file mode 100644 index 0000000..1124428 --- /dev/null +++ b/srcpkgs/ericw-tools/patches/cmake-vis.diff @@ -0,0 +1,24 @@ +--- vis/CMakeLists.txt.orig 2019-03-25 22:56:31.000000000 -0400 ++++ vis/CMakeLists.txt 2019-10-30 10:30:46.452610802 -0400 +@@ -1,5 +1,5 @@ + cmake_minimum_required (VERSION 2.8) +-project (vis CXX) ++project (ericw-vis CXX) + + set(VIS_INCLUDES + ${CMAKE_SOURCE_DIR}/include/vis/leafbits.hh +@@ -21,10 +21,10 @@ + ${COMMON_INCLUDES} + ${VIS_INCLUDES}) + +-add_executable(vis ${VIS_SOURCES}) +-target_link_libraries (vis ${CMAKE_THREAD_LIBS_INIT}) ++add_executable(ericw-vis ${VIS_SOURCES}) ++target_link_libraries (ericw-vis ${CMAKE_THREAD_LIBS_INIT}) + find_library(M_LIB m) + if (M_LIB) +- target_link_libraries (vis ${M_LIB}) ++ target_link_libraries (ericw-vis ${M_LIB}) + endif (M_LIB) +-install(TARGETS vis RUNTIME DESTINATION bin) ++install(TARGETS ericw-vis RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/srcpkgs/ericw-tools/patches/man-bspinfo.diff b/srcpkgs/ericw-tools/patches/man-bspinfo.diff new file mode 100644 index 0000000..8ecb4c2 --- /dev/null +++ b/srcpkgs/ericw-tools/patches/man-bspinfo.diff @@ -0,0 +1,24 @@ +--- man/bspinfo.1 2019-03-25 22:56:31.000000000 -0400 ++++ man/ericw-bspinfo.1 2019-10-29 05:40:23.549433524 -0400 +@@ -1,16 +1,16 @@ + .\" Process this file with +-.\" groff -man -Tascii bspinfo.1 ++.\" groff -man -Tascii ericw-bspinfo.1 + .\" +-.TH BSPINFO 1 "TYR_VERSION" TYRUTILS ++.TH ERICW-BSPINFO 1 "TYR_VERSION" TYRUTILS + + .SH NAME +-bspinfo \- print basic information about a Quake BSP file ++ericw-bspinfo \- print basic information about a Quake BSP file + + .SH SYNOPSIS +-\fBbspinfo\fP BSPFILE ++\fBericw-bspinfo\fP BSPFILE + + .SH DESCRIPTION +-\fBbspinfo\fP will print a very basic summary of the internal data in ++\fBericw-bspinfo\fP will print a very basic summary of the internal data in + \fIBSPFILE\fP. The BSP version number is printed, followed by one + line for each of the data types inside, giving the count and data size + in bytes of each data type. diff --git a/srcpkgs/ericw-tools/patches/man-bsputil.diff b/srcpkgs/ericw-tools/patches/man-bsputil.diff new file mode 100644 index 0000000..239e639 --- /dev/null +++ b/srcpkgs/ericw-tools/patches/man-bsputil.diff @@ -0,0 +1,24 @@ +--- man/bsputil.1 2019-03-25 22:56:31.000000000 -0400 ++++ man/ericw-bsputil.1 2019-10-29 05:40:38.484407930 -0400 +@@ -1,16 +1,16 @@ + .\" Process this file with +-.\" groff -man -Tascii bsputil.1 ++.\" groff -man -Tascii ericw-bsputil.1 + .\" +-.TH BSPUTIL 1 "TYR_VERSION" TYRUTILS ++.TH ERICW-BSPUTIL 1 "TYR_VERSION" TYRUTILS + + .SH NAME +-bsputil \- utiltiy for working with Quake BSP files ++ericw-bsputil \- utiltiy for working with Quake BSP files + + .SH SYNOPSIS +-\fBbsputil\fP [OPTION]... BSPFILE ++\fBericw-bsputil\fP [OPTION]... BSPFILE + + .SH DESCRIPTION +-\fBbsputil is a small utility for basic manipulation of Quake BSP files. ++\fBericw-bsputil is a small utility for basic manipulation of Quake BSP files. + + .SH OPTIONS + .IP "\fB--extract-textures\fP" diff --git a/srcpkgs/ericw-tools/patches/man-light.diff b/srcpkgs/ericw-tools/patches/man-light.diff new file mode 100644 index 0000000..2b88bd5 --- /dev/null +++ b/srcpkgs/ericw-tools/patches/man-light.diff @@ -0,0 +1,33 @@ +--- man/light.1 2019-03-25 22:56:31.000000000 -0400 ++++ man/ericw-light.1 2019-10-29 05:40:54.197381002 -0400 +@@ -1,16 +1,16 @@ + .\" Process this file with +-.\" groff -man -Tascii light.1 ++.\" groff -man -Tascii ericw-light.1 + .\" +-.TH LIGHT 1 "TYR_VERSION" TYRUTILS ++.TH ERICW-LIGHT 1 "TYR_VERSION" TYRUTILS + + .SH NAME +-light \- Caclulate lightmap data for a Quake BSP file ++ericw-light \- Caclulate lightmap data for a Quake BSP file + + .SH SYNOPSIS +-\fBlight\fP [OPTION]... BSPFILE ++\fBericw-light\fP [OPTION]... BSPFILE + + .SH DESCRIPTION +-\fBlight\fP reads a Quake .bsp file and calculates light and shadow ++\fBericw-light\fP reads a Quake .bsp file and calculates light and shadow + information based on the entity definitions contained in the .bsp. The .bsp + file is updated with the new light data upon completion, overwriting any + existing lighting data. +@@ -26,7 +26,7 @@ + + .SS "Performance options:" + .IP "\fB-threads n\fP" +-Set number of threads explicitly. By default light will attempt to detect the ++Set number of threads explicitly. By default ericw-light will attempt to detect the + number of CPUs/cores available. + .IP "\fB-extra\fP" + Calculate extra samples (2x2) and average the results for smoother shadows. diff --git a/srcpkgs/ericw-tools/patches/man-qbsp.diff b/srcpkgs/ericw-tools/patches/man-qbsp.diff new file mode 100644 index 0000000..9a70a8f --- /dev/null +++ b/srcpkgs/ericw-tools/patches/man-qbsp.diff @@ -0,0 +1,26 @@ +--- man/qbsp.1 2019-03-25 22:56:31.000000000 -0400 ++++ man/ericw-qbsp.1 2019-10-29 05:41:08.825355933 -0400 +@@ -1,17 +1,17 @@ + .\" Process this file with +-.\" groff -man -Tascii qbsp.1 ++.\" groff -man -Tascii ericw-qbsp.1 + .\" +-.TH QBSP 1 "TYR_VERSION" TYRUTILS ++.TH ERICW-QBSP 1 "TYR_VERSION" TYRUTILS + + .SH NAME +-qbsp \- Compile a Quake BSP file from a MAP source file ++ericw-qbsp \- Compile a Quake BSP file from a MAP source file + + .SH SYNOPSIS +-\fBqbsp\fP [OPTION]... SOURCFILE [DESTFILE] ++\fBericw-qbsp\fP [OPTION]... SOURCFILE [DESTFILE] + + .SH DESCRIPTION +-\fBqbsp\fP is a tool used in the creation of maps for the \fB id Software\fP +-game \fBQuake\fP. qbsp takes a .map file as input and produces a .bsp file ++\fBericw-qbsp\fP is a tool used in the creation of maps for the \fB id Software\fP ++game \fBQuake\fP. ericw-qbsp takes a .map file as input and produces a .bsp file + playable in the Quake engine. If the \fIDESTFILE\fP argument is not supplied, + the output filename will be chosen by stripping the file extension (if any) + from \fISOURCEFILE\fP and appending the .bsp extension. diff --git a/srcpkgs/ericw-tools/patches/man-vis.diff b/srcpkgs/ericw-tools/patches/man-vis.diff new file mode 100644 index 0000000..31d77f5 --- /dev/null +++ b/srcpkgs/ericw-tools/patches/man-vis.diff @@ -0,0 +1,24 @@ +--- man/vis.1 2019-03-25 22:56:31.000000000 -0400 ++++ man/ericw-vis.1 2019-10-29 05:41:23.637330549 -0400 +@@ -1,16 +1,16 @@ + .\" Process this file with +-.\" groff -man -Tascii vis.1 ++.\" groff -man -Tascii ericw-vis.1 + .\" +-.TH VIS 1 "TYR_VERSION" TYRUTILS ++.TH ERICW-VIS 1 "TYR_VERSION" TYRUTILS + + .SH NAME +-vis \- Compute visibility (PVS) for a Quake BSP file ++ericw-vis \- Compute visibility (PVS) for a Quake BSP file + + .SH SYNOPSIS +-\fBvis\fP [OPTION]... BSPFILE ++\fBericw-vis\fP [OPTION]... BSPFILE + + .SH DESCRIPTION +-\fBvis\fP is a tool used in the creation of maps for the game Quake. vis ++\fBericw-vis\fP is a tool used in the creation of maps for the game Quake. ericw-vis + looks for a .prt file by stripping the file extension from BSPFILE (if any) + and appending ".prt". vis then calculates the potentially visible set (PVS) + information before updating the .bsp file, overwriting any existing PVS data. diff --git a/srcpkgs/ericw-tools/template b/srcpkgs/ericw-tools/template new file mode 100644 index 0000000..b4af142 --- /dev/null +++ b/srcpkgs/ericw-tools/template @@ -0,0 +1,22 @@ +# Template file for 'ericw-tools' +pkgname=ericw-tools +version=0.18.2rc1 +_version=${version%rc1}-rc1 +revision=1 +build_style=cmake +hostmakedepends="groff" +makedepends="embree-devel" +short_desc="Map compilation tools for Quake, Hexen 2 et al." +maintainer="Alison Watson " +license="GPL-2.0-or-later" +homepage="http://ericwa.github.io/ericw-tools/" +distfiles="https://github.com/ericwa/ericw-tools/archive/v${_version}.tar.gz" +checksum=1905752a582882f587b822e4186a7126522833b32b9777dcd46fe0f3c7cedf87 +wrksrc=${pkgname}-${_version} + +post_patch() { + for f in bspinfo bsputil light qbsp vis + do + mv "man/${f}.1" "man/ericw-${f}.1" + done +}