[packages/wpe-cog] - new
qboosh
qboosh at pld-linux.org
Wed Mar 4 20:15:21 CET 2020
commit 09b275c74fc1cacc09069382364b9b338a748ab0
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Mar 4 20:16:08 2020 +0100
- new
cog-link.patch | 28 ++++++++++
wpe-cog.spec | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 193 insertions(+)
---
diff --git a/wpe-cog.spec b/wpe-cog.spec
new file mode 100644
index 0000000..b68d1d2
--- /dev/null
+++ b/wpe-cog.spec
@@ -0,0 +1,165 @@
+#
+# Conditional build:
+%bcond_with gtk # WebKitGTK+ instead of WPEWebKit
+%bcond_without drm # DRM platform module
+%bcond_without fdo # FDO platform module
+%bcond_with weston # direct display support for FDO platform module
+#
+%if %{with gtk}
+%undefine with_drm
+%undefine with_fdo
+%undefine with_weston
+%endif
+Summary: Cog Core - WPE WebKit base launcher
+Summary(pl.UTF-8): Cog Core - narzędzie do uruchamiania środowiska WPE WebKit
+Name: wpe-cog
+Version: 0.5.1
+Release: 1
+License: MIT
+Group: Libraries
+Source0: https://wpewebkit.org/releases/cog-%{version}.tar.xz
+# Source0-md5: 48ceb4159b7f14324fa8d3c480968d40
+Patch0: cog-link.patch
+URL: https://wpewebkit.org/
+BuildRequires: cmake >= 3.3
+BuildRequires: gcc >= 5:3.2
+BuildRequires: glib2-devel >= 1:2.44
+BuildRequires: pkgconfig
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+%if %{with gtk}
+BuildRequires: gtk-webkit4-devel >= 2.20.0
+%else
+# TODO: 2.28 when available
+BuildRequires: wpe-webkit-devel >= 2.24.0
+%if %{with drm}
+BuildRequires: EGL-devel
+BuildRequires: Mesa-libgbm-devel >= 13.0
+BuildRequires: libdrm-devel >= 2.4.71
+BuildRequires: libinput-devel
+BuildRequires: udev-devel
+BuildRequires: wayland-devel
+BuildRequires: wpebackend-fdo-devel >= 1.3.1
+%endif
+%if %{with fdo}
+BuildRequires: EGL-devel
+BuildRequires: wayland-devel >= 1.10
+BuildRequires: wayland-egl-devel
+BuildRequires: wpebackend-fdo-devel >= 1.3.1
+BuildRequires: xorg-lib-libxkbcommon-devel
+%if %{with weston}
+BuildRequires: weston-devel >= 9
+%endif
+%endif
+%endif
+Requires: %{name}-libs = %{version}-%{release}
+%if %{with drm}
+Requires: Mesa-libgbm >= 13.0
+Requires: libdrm >= 2.4.71
+Requires: wpebackend-fdo >= 1.3.1
+%endif
+%if %{with fdo}
+Requires: wayland >= 1.10
+Requires: wpebackend-fdo >= 1.3.1
+%if %{with weston}
+Requires: weston >= 9
+%endif
+%endif
+# cog in PLD used to be different project: http://www.krakoa.dk/old-linux-software.html#COG
+Conflicts: cog
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Cog Core - WPE WebKit base launcher.
+
+%description -l pl.UTF-8
+Cog Core - narzędzie do uruchamiania środowiska WPE WebKit.
+
+%package libs
+Summary: Cog Core library
+Summary(pl.UTF-8): Biblioteka Cog Core
+Group: Libraries
+Requires: glib2 >= 1:2.44
+%if %{with gtk}
+Requires: gtk-webkit4 >= 2.20.0
+%else
+Requires: wpe-webkit >= 2.24.0
+%endif
+
+%description libs
+Cog Core library.
+
+%description libs -l pl.UTF-8
+Biblioteka Cog Core.
+
+%package devel
+Summary: Header files for Cog Core library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Cog Core
+Group: Development/Libraries
+Requires: %{name}-libs = %{version}-%{release}
+%if %{with gtk}
+Requires: gtk-webkit4-devel >= 2.20.0
+%else
+Requires: wpe-webkit-devel >= 2.24.0
+%endif
+
+%description devel
+Header files for Cog Core library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki Cog Core.
+
+%prep
+%setup -q -n cog-%{version}
+%patch0 -p1
+
+%build
+install -d build
+cd build
+# .pc file creation expects relative CMAKE_INSTALL_LIBDIR
+%cmake .. \
+ -DCMAKE_INSTALL_LIBDIR=%{_lib} \
+ -DCOG_HOME_URI="https://www.pld-linux.org/" \
+ %{?with_drm:-DCOG_PLATFORM_DRM=ON} \
+ %{!?with_fdo:-DCOG_PLATFORM_FDO=OFF} \
+ %{?with_gtk:-DCOG_USE_WEBKITGTK=ON} \
+ %{?with_weston:-DCOG_WESTON_DIRECT_DISPLAY=ON}
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post libs -p /sbin/ldconfig
+%postun libs -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc ARCHITECTURE.md COPYING NEWS README.md
+%attr(755,root,root) %{_bindir}/cog
+%attr(755,root,root) %{_bindir}/cogctl
+%if %{with drm}
+%attr(755,root,root) %{_libdir}/libcogplatform-drm.so
+%endif
+%if %{with fdo}
+%attr(755,root,root) %{_libdir}/libcogplatform-fdo.so
+%endif
+%{_mandir}/man1/cog.1*
+%{_mandir}/man1/cogctl.1*
+
+%files libs
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libcogcore.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libcogcore.so.1
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libcogcore.so
+%{_includedir}/cog
+%{_pkgconfigdir}/cogcore.pc
diff --git a/cog-link.patch b/cog-link.patch
new file mode 100644
index 0000000..97f1d9f
--- /dev/null
+++ b/cog-link.patch
@@ -0,0 +1,28 @@
+--- cog-0.5.1/CMakeLists.txt.orig 2020-03-04 19:24:28.912971337 +0100
++++ cog-0.5.1/CMakeLists.txt 2020-03-04 19:24:32.909616352 +0100
+@@ -120,6 +120,7 @@
+ endif ()
+ add_definitions(-DCOG_BG_COLOR_API_SUPPORTED=1)
+ else ()
++ set(COGCORE_DL_LDFLAGS "-ldl")
+ list(APPEND COGCORE_API_HEADERS core/cog-platform.h)
+ list(APPEND COGCORE_SOURCES core/cog-platform.c)
+ # There is no need to explicitly check wpe-1.0 here because it's a
+@@ -144,7 +145,7 @@
+ if (HAS_WALL)
+ set(COGCORE_CFLAGS ${WEB_ENGINE_CFLAGS_OTHER} ${SOUP_CFLAGS_OTHER} "-Wall")
+ endif ()
+-set(COGCORE_LDFLAGS ${WEB_ENGINE_LDFLAGS} ${SOUP_LDFLAGS})
++set(COGCORE_LDFLAGS ${WEB_ENGINE_LDFLAGS} ${SOUP_LDFLAGS} ${COGCORE_DL_LDFLAGS})
+
+
+ if (COG_DBUS_SYSTEM_BUS)
+@@ -180,7 +181,7 @@
+ if (HAS_WALL)
+ target_compile_options(cog PUBLIC "-Wall")
+ endif ()
+- target_link_libraries(cog cogcore -ldl)
++ target_link_libraries(cog cogcore)
+
+ add_executable(cogctl cogctl.c core/cog-utils.c)
+ set_property(TARGET cogctl PROPERTY C_STANDARD 99)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/wpe-cog.git/commitdiff/09b275c74fc1cacc09069382364b9b338a748ab0
More information about the pld-cvs-commit
mailing list