From 086fadd43911ad5b728e1e67f60ecc06e9819fa9 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Mon, 4 May 2020 20:22:20 +0200 Subject: [PATCH] x11-apps/sakura: initial import --- .../sakura-3.7.0-Use-GNUInstallDirs.patch | 84 +++++++++++++++++++ .../x11-apps/sakura/sakura-3.7.0.exheres-0 | 25 ++++++ packages/x11-apps/sakura/sakura.exlib | 24 ++++++ 3 files changed, 133 insertions(+) create mode 100644 packages/x11-apps/sakura/files/sakura-3.7.0-Use-GNUInstallDirs.patch create mode 100644 packages/x11-apps/sakura/sakura-3.7.0.exheres-0 create mode 100644 packages/x11-apps/sakura/sakura.exlib diff --git a/packages/x11-apps/sakura/files/sakura-3.7.0-Use-GNUInstallDirs.patch b/packages/x11-apps/sakura/files/sakura-3.7.0-Use-GNUInstallDirs.patch new file mode 100644 index 0000000..a3ae404 --- /dev/null +++ b/packages/x11-apps/sakura/files/sakura-3.7.0-Use-GNUInstallDirs.patch @@ -0,0 +1,84 @@ +From c116f39931e57713f485664717841f858dd6c8d9 Mon Sep 17 00:00:00 2001 +From: Julian Ospald +Date: Tue, 24 May 2016 21:32:40 +0200 +Subject: [PATCH] Use GNUInstallDirs +Upstream: no + +This allows better control over the install destinations. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5f63cf1..689d2eb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,6 +5,7 @@ SET (AUTHOR "David Gómez Espinosa" INTERNAL "Author") + SET (VERSION "3.7.0") + + ++INCLUDE (GNUInstallDirs) + INCLUDE (FindPkgConfig) + + IF (NOT PKG_CONFIG_FOUND) +@@ -35,7 +36,8 @@ FIND_PROGRAM(POD2MAN pod2man) + MESSAGE ("pod2man executable is" ${POD2MAN}) + + ADD_DEFINITIONS (-DVERSION="${VERSION}") +-ADD_DEFINITIONS (-DDATADIR="${CMAKE_INSTALL_PREFIX}/share") ++ADD_DEFINITIONS (-DLOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}") ++ADD_DEFINITIONS (-DPIXMAPSDIR="${CMAKE_INSTALL_FULL_DATAROOTDIR}/pixmaps") + ADD_DEFINITIONS (-DBUILDTYPE="${CMAKE_BUILD_TYPE}") + + IF (${CMAKE_BUILD_TYPE} MATCHES "Debug") +@@ -51,13 +53,13 @@ ADD_EXECUTABLE (sakura src/sakura.c) + + ADD_SUBDIRECTORY (po) + +-INSTALL (TARGETS sakura RUNTIME DESTINATION bin) +-INSTALL (FILES sakura.desktop DESTINATION share/applications) +-INSTALL (FILES terminal-tango.svg DESTINATION share/pixmaps) ++INSTALL (TARGETS sakura RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++INSTALL (FILES sakura.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) ++INSTALL (FILES terminal-tango.svg DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps) + IF (POD2MAN) +- INSTALL (FILES ${sakura_BINARY_DIR}/sakura.1 DESTINATION share/man/man1) ++ INSTALL (FILES ${sakura_BINARY_DIR}/sakura.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) + ENDIF (POD2MAN) +-INSTALL (FILES INSTALL DESTINATION share/doc/sakura) ++INSTALL (FILES INSTALL DESTINATION ${CMAKE_INSTALL_DOCDIR}) + + FILE (GLOB MO_FILES po/*.mo) + +diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt +index a710347..cfe380a 100644 +--- a/po/CMakeLists.txt ++++ b/po/CMakeLists.txt +@@ -27,7 +27,7 @@ ELSE(NOT MSGFMT) + COMMAND ${MSGFMT} --check -o ${_moFile} ${_poFile} + DEPENDS ${_poFile}) + INSTALL(FILES ${CMAKE_BINARY_DIR}/po/${_moFile} +- DESTINATION share/locale/${_lang}/LC_MESSAGES/ ++ DESTINATION ${CMAKE_INSTALL_LOCALEDIR}/${_lang}/LC_MESSAGES/ + RENAME ${catalogname}.mo) + ENDFOREACH(_poFile ${PO_FILES}) + +diff --git a/src/sakura.c b/src/sakura.c +index a0084c2..f1437fe 100644 +--- a/src/sakura.c ++++ b/src/sakura.c +@@ -2243,7 +2243,7 @@ sakura_init() + if (option_icon) { + icon_path = g_strdup_printf("%s", option_icon); + } else { +- icon_path = g_strdup_printf(DATADIR "/pixmaps/%s", sakura.icon); ++ icon_path = g_strdup_printf(PIXMAPSDIR "/%s", sakura.icon); + } + gtk_window_set_icon_from_file(GTK_WINDOW(sakura.main_window), icon_path, &error); + g_free(icon_path); icon_path=NULL; +@@ -3405,7 +3405,7 @@ main(int argc, char **argv) + + /* Localization */ + setlocale(LC_ALL, ""); +- localedir=g_strdup_printf("%s/locale", DATADIR); ++ localedir=g_strdup_printf("%s", LOCALEDIR); + textdomain(GETTEXT_PACKAGE); + bindtextdomain(GETTEXT_PACKAGE, localedir); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); diff --git a/packages/x11-apps/sakura/sakura-3.7.0.exheres-0 b/packages/x11-apps/sakura/sakura-3.7.0.exheres-0 new file mode 100644 index 0000000..9de8082 --- /dev/null +++ b/packages/x11-apps/sakura/sakura-3.7.0.exheres-0 @@ -0,0 +1,25 @@ +# Copyright 2013 Tod Jackson +# Distributed under the terms of the GNU General Public License v2 +# Which is based upon the exheres: +# Copyright 2012 Kevin Decherf +# Distributed under the terms of the GNU General Public License v2 + +require freedesktop-desktop launchpad [ suffix=tar.gz branch=trunk ] sakura + +PLATFORMS="~amd64 ~x86" + +DEPENDENCIES=" + build: + dev-lang/perl:* [[ note = [ For pod2man ] ]] + virtual/pkg-config + build+run: + dev-libs/glib:2[>=2.40] + dev-libs/vte:2.91 + x11-libs/gtk+:3[>=3.12] + x11-libs/libXft +" + +DEFAULT_SRC_PREPARE_PATCHES+=( + "${FILES}"/${PNV}-Use-GNUInstallDirs.patch +) + diff --git a/packages/x11-apps/sakura/sakura.exlib b/packages/x11-apps/sakura/sakura.exlib new file mode 100644 index 0000000..46a5aaa --- /dev/null +++ b/packages/x11-apps/sakura/sakura.exlib @@ -0,0 +1,24 @@ +# Copyright 2010 Julien Pivotto +# Distributed under the terms of the GNU General Public License v2 + +require cmake [ api=2 ] + +SUMMARY="sakura is a vte-based terminal emulator." +DESCRIPTION="sakura is a terminal emulator based on GTK and VTE. It's a terminal emulator with few +dependencies, so you don't need a full GNOME desktop installed to have a decent terminal emulator. + +Current terminal emulators based on VTE are gnome-terminal, XFCE Terminal, TermIt and a small +sample program included in the vte sources. The differences between sakura and the last one are +that it uses a notebook to provide several terminals in one window and adds a contextual menu with +some basic options. No more no less." +HOMEPAGE="http://pleyades.net/david/projects/sakura" + +LICENCES="GPL-2" +SLOT="0" + +REMOTE_IDS="freshmeat:sakura launchpad:sakura" + +CMAKE_SRC_CONFIGURE_PARAMS=( + -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PNVR} +) +