From 47a7819ea0b4e38ac6cd0f00cd9c3e4bcba9eca53f01eba80a739dcb9ab6c7af Mon Sep 17 00:00:00 2001 From: Julius Enriquez Date: Wed, 22 May 2024 19:51:18 +0000 Subject: [PATCH] Accepting request 1175942 from home:win8linux - Change gpm to a BuildRequires - Changed patch to be compatible with osc - Use correct library paths - Add updated tarball - Add patch to use GNUInstallDirs for CMake - Split devel into devel and devel-static, put static lib in devel-static - Move requires and suggests to subpackages OBS-URL: https://build.opensuse.org/request/show/1175942 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tvision?expand=0&rev=4 --- Use-GNUInstallDirs.patch | 53 +++++++++++++++++++++++++++++ tvision-0~git621.tar.xz | 3 -- tvision-0~git630.tar.xz | 3 ++ tvision.changes | 22 ++++++++++++ tvision.spec | 73 ++++++++++++++++++++++++++++++++-------- 5 files changed, 137 insertions(+), 17 deletions(-) create mode 100644 Use-GNUInstallDirs.patch delete mode 100644 tvision-0~git621.tar.xz create mode 100644 tvision-0~git630.tar.xz diff --git a/Use-GNUInstallDirs.patch b/Use-GNUInstallDirs.patch new file mode 100644 index 0000000..e93a6a7 --- /dev/null +++ b/Use-GNUInstallDirs.patch @@ -0,0 +1,53 @@ +diff -ruN a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -149,6 +149,8 @@ + + option(TV_BUILD_AVSCOLOR "Build AviSynth TermColor plugin" OFF) + ++include(GNUInstallDirs) ++ + tv_message_mp(STATUS "Install path: ${CMAKE_INSTALL_PREFIX}") + tv_message(STATUS "Build Examples: ${TV_BUILD_EXAMPLES}") + if (MAY_BUILD_USING_GPM) +diff -ruN a/examples/CMakeLists.txt b/examples/CMakeLists.txt +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -25,7 +25,7 @@ + # Until CMake 3.13, 'install' only accepts targets defined + # in the current directory. So install from this function. + if (${app} IN_LIST TVINSTALLAPPS) +- install(TARGETS ${app} RUNTIME DESTINATION bin) ++ install(TARGETS ${app} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() + endfunction() + +diff -ruN a/source/CMakeLists.txt b/source/CMakeLists.txt +--- a/source/CMakeLists.txt ++++ b/source/CMakeLists.txt +@@ -153,14 +153,14 @@ + # + install(TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}-config +- ARCHIVE DESTINATION lib ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + COMPONENT library + ) + + # package configuration + + install(EXPORT ${PROJECT_NAME}-config +- DESTINATION lib/cmake/${PROJECT_NAME} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} + NAMESPACE ${PROJECT_NAME}:: + FILE ${PROJECT_NAME}-config.cmake + COMPONENT library +@@ -169,7 +169,7 @@ + # includes + # ./include/tvision and children copied to destination/include/tvision etc... + # +-install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/tvision" DESTINATION include) ++install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/tvision" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + # Build optimization + diff --git a/tvision-0~git621.tar.xz b/tvision-0~git621.tar.xz deleted file mode 100644 index c3c27b0..0000000 --- a/tvision-0~git621.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:59688a5f1792b3f7831b828c304d0dcfa03bc9ed9da300a66d6074c134358a64 -size 722044 diff --git a/tvision-0~git630.tar.xz b/tvision-0~git630.tar.xz new file mode 100644 index 0000000..e33176c --- /dev/null +++ b/tvision-0~git630.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:878c39f5ab28bf868c5a3711f406a77b1b292c0db851c4ef70db44c2ffba8877 +size 722120 diff --git a/tvision.changes b/tvision.changes index d43e13f..89ea51c 100644 --- a/tvision.changes +++ b/tvision.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Wed May 22 17:08:17 UTC 2024 - Julius Enriquez + +- Changed patch to be compatible with osc +- Use correct library paths + +------------------------------------------------------------------- +Wed May 22 16:50:53 UTC 2024 - Julius Enriquez + +- Add updated tarball + +------------------------------------------------------------------- +Wed May 22 16:34:06 UTC 2024 - Julius Enriquez + +- Add patch to use GNUInstallDirs for CMake + +------------------------------------------------------------------- +Tue May 21 18:30:58 UTC 2024 - Julius Enriquez + +- Split devel into devel and devel-static, put static lib in devel-static +- Move requires and suggests to subpackages + ------------------------------------------------------------------- Sun May 19 10:24:57 UTC 2024 - Julius Enriquez diff --git a/tvision.spec b/tvision.spec index 3ab5bd1..fbd0b04 100644 --- a/tvision.spec +++ b/tvision.spec @@ -19,21 +19,13 @@ %bcond_without test Name: tvision Release: 0 -Version: 0~git621 +Version: 0~git630 Summary: Modern port of Turbo Vision 2.0 Group: Development/Languages/C and C++ License: MIT URL: https://github.com/magiblot/tvision Source: %{name}-%{version}.tar.xz -BuildRequires: binutils -BuildRequires: gcc-c++ -BuildRequires: cmake -BuildRequires: make -BuildRequires: pkgconfig(ncurses) -BuildRequires: gtest -Requires: pkgconfig(ncurses) -Suggests: gpm -Suggests: (xclip or xset) +Patch1: Use-GNUInstallDirs.patch %description A modern port of Turbo Vision 2.0, the classical @@ -57,18 +49,70 @@ display of fullwidth Unicode characters, etc. %package devel Summary: Headers for Turbo Vision 2.0 Group: Development/Languages/C and C++ +BuildRequires: binutils +BuildRequires: gcc-c++ +BuildRequires: cmake +BuildRequires: make +BuildRequires: pkgconfig(ncurses) +BuildRequires: gtest +Suggests: gpm +Suggests: (xclip or xset) %description devel -This package contains the library, headers, and help file +This package contains the headers and help file compiler from the modernised Turbo Vision 2.0 port. A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces, but with Unicode support. +%package devel-static +Summary: Static library for Turbo Vision 2.0 +Group: Development/Languages/C and C++ +BuildRequires: binutils +BuildRequires: gcc-c++ +BuildRequires: cmake +BuildRequires: make +BuildRequires: pkgconfig(ncurses) +BuildRequires: gtest +Suggests: gpm +Suggests: (xclip or xset) + +%description devel-static +This package contains the static library from the +modernised Turbo Vision 2.0 port. + +A modern port of Turbo Vision 2.0, the classical +framework for text-based user interfaces, but with +Unicode support. + +Turbo Vision lets application developers avoid +writing platform-specific workarounds for TUI apps. +It attempts to reproduce consistent results everywhere, +without developers worrying about terminal capabilities, +direct I/O, ifdefs, and other platform quirks. + +Turbo Vision provides many widget classes (also known +as views), including resizable, overlapping windows, +pull-down menus, dialog boxes, buttons, scroll bars, +input boxes, check boxes and radio buttons. You may +use and extend these; but even if you prefer creating +your own, Turbo Vision already handles event dispatching, +display of fullwidth Unicode characters, etc. + + %package demos Summary: Demo programs of Turbo Vision 2.0 Group: Development/Languages/C and C++ +BuildRequires: binutils +BuildRequires: gcc-c++ +BuildRequires: cmake +BuildRequires: make +BuildRequires: pkgconfig(ncurses) +Requires: pkgconfig(ncurses) +Suggests: gpm +Suggests: (xclip or xset) + %description demos This package contains demo programs showing off the @@ -86,7 +130,6 @@ with Unicode support. %global _lto_cflags %nil # Add CMake flag to let libtvision.a be used properly as a shared lib - %cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON %cmake_build @@ -102,10 +145,12 @@ popd %files devel %license COPYRIGHT %doc README.md -%{_prefix}/lib/libtvision.a %{_bindir}/tvhc %{_includedir}/* -%{_prefix}/lib/cmake/ +%{_prefix}/%{_lib}/cmake/ + +%files devel-static +%{_prefix}/%{_lib}/libtvision.a %files demos %{_bindir}/tvdemo