- Use CCode attribute for setproctitle() function, bug #1324424 [1]

- Add new dependency, sysutils/contractor
- Fix pkg-plist
- Bump PORTREVISION

[1] https://bugs.launchpad.net/granite/+bug/1324424
This commit is contained in:
Olivier Duchateau 2014-05-29 17:26:42 +00:00
parent 4c8736f8f1
commit fa91bbab04
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=355716
5 changed files with 48 additions and 9 deletions

View File

@ -4,9 +4,11 @@
PORTNAME= granite
PORTVERSION= 0.2.3.1
PORTREVISION= 1
CATEGORIES= x11-toolkits
MASTER_SITES= https://launchpadlibrarian.net/169958088/ \
https://launchpad.net/${PORTNAME}/0.2/${PORTVERSION}/+download/
DIST_SUBDIR= eos
MAINTAINER= olivierd@FreeBSD.org
COMMENT= Extensions of Gtk+ toolkit
@ -15,6 +17,7 @@ LICENSE= GPLv3
BUILD_DEPENDS= valac:${PORTSDIR}/lang/vala
LIB_DEPENDS= libgee-0.8.so:${PORTSDIR}/devel/libgee
RUN_DEPENDS= contractor:${PORTSDIR}/sysutils/contractor
USE_GCC= yes
USES= cmake pkgconfig gettext tar:tgz

View File

@ -1,2 +1,2 @@
SHA256 (granite-0.2.3.1.tgz) = 56f05338bb7967f0b912d35bf780a3ddd68b517e1939371a14a5f79581a8f80d
SIZE (granite-0.2.3.1.tgz) = 152607
SHA256 (eos/granite-0.2.3.1.tgz) = 56f05338bb7967f0b912d35bf780a3ddd68b517e1939371a14a5f79581a8f80d
SIZE (eos/granite-0.2.3.1.tgz) = 152607

View File

@ -1,5 +1,5 @@
--- ./CMakeLists.txt.orig 2013-12-15 12:43:00.000000000 +0000
+++ ./CMakeLists.txt 2013-12-26 19:54:31.000000000 +0000
--- ./CMakeLists.txt.orig 2014-03-18 20:51:49.000000000 +0000
+++ ./CMakeLists.txt 2014-05-29 09:36:44.000000000 +0000
@@ -24,12 +24,28 @@
include (CPack)
add_custom_target (dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
@ -29,7 +29,7 @@
#
# Packages in PKG_DEPS are used with the vala compiler and other related tools (not versioned.)
# Packages in PKG_DEPS_CHECK are used with PKG-Config and for linking, etc. They can contain versions.
@@ -42,19 +58,18 @@
@@ -42,31 +58,37 @@
gtk+-3.0
gio-unix-2.0
posix
@ -52,11 +52,25 @@
pkg_check_modules (DEPS REQUIRED ${PKG_DEPS_CHECK})
set (VALAC_OPTIONS
@@ -66,7 +81,6 @@
--thread
--target-glib=2.32)
-if (CMAKE_SYSTEM_NAME MATCHES "Linux")
+if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set (VALAC_OPTIONS ${VALAC_OPTIONS} --define=LINUX)
+elseif (${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
+ set (VALAC_OPTIONS ${VALAC_OPTIONS} --define=DragonFly)
+elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+ set (VALAC_OPTIONS ${VALAC_OPTIONS} --define=FreeBSD)
+elseif (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
+ set (VALAC_OPTIONS ${VALAC_OPTIONS} --define=NetBSD)
+elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
+ set (VALAC_OPTIONS ${VALAC_OPTIONS} --define=OpenBSD)
endif ()
add_subdirectory (lib)
-add_subdirectory (demo)
add_subdirectory (doc)
-add_subdirectory (doc)
+#add_subdirectory (doc)
add_subdirectory (po)
add_subdirectory (icons)

View File

@ -0,0 +1,24 @@
--- ./lib/Application.vala.orig 2014-03-18 20:51:49.000000000 +0000
+++ ./lib/Application.vala 2014-05-29 09:42:26.000000000 +0000
@@ -69,6 +69,8 @@
public Application () {
#if LINUX
prctl (15, exec_name, 0, 0, 0);
+#elif DragonFly || FreeBSD || NetBSD || OpenBSD
+ setproctitle (exec_name);
#endif
Environment.set_prgname (exec_name);
@@ -90,6 +92,12 @@
#if LINUX
[CCode (cheader_filename = "sys/prctl.h", cname = "prctl")]
protected extern static int prctl (int option, string arg2, ulong arg3, ulong arg4, ulong arg5);
+#elif DragonFly || FreeBSD
+ [CCode (cheader_filename = "unistd.h", cname = "setproctitle")]
+ protected extern static void setproctitle (string fmt, ...);
+#elif NetBSD || OpenBSD
+ [CCode (cheader_filename = "stdlib.h", cname = "setproctitle")]
+ protected extern static void setproctitle (string fmt, ...);
#endif
/**

View File

@ -71,8 +71,6 @@ share/locale/zh_CN/LC_MESSAGES/granite.mo
share/locale/zh_TW/LC_MESSAGES/granite.mo
share/vala/vapi/granite.deps
share/vala/vapi/granite.vapi
@dirrmtry share/vala/vapi
@dirrmtry share/vala
@dirrmtry share/locale/ug/LC_MESSAGES
@dirrmtry share/locale/ug
@dirrmtry share/locale/te/LC_MESSAGES