LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   trying to build a package for webkitgtk-2.16.1 (https://www.linuxquestions.org/questions/slackware-14/trying-to-build-a-package-for-webkitgtk-2-16-1-a-4175604656/)

vonbiber 04-26-2017 07:51 AM

trying to build a package for webkitgtk-2.16.1
 
I'm trying to build a package for webkitgtk-2.16.1
There is no configure file (cmake is used).
I can't find any documentation about the options available and where the installed files go to.

After some trials and errors I was able to built it successfully by running this
Code:

mkdir -p build || exit 1
cd build

cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_RPATH=ON \
 -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX \
 -DLIBEXEC_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX/webkit2gtk-4.0 \
 -DCMAKE_C_FLAGS="$SLKCFLAGS" -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
 -DENABLE_MINIBROWSER=ON \
 -DUSE_LIBHYPHEN=OFF -DENABLE_GEOLOCATION=OFF .. || exit 1

make -j$(nproc) || make || exit 1

There's no DESTDIR in Makefile

I figured that these directories are going to be used for the installation if I want to manually copy the files:
Code:

mkdir -p $PKG/usr/bin
mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/webkit2gtk-4.0
mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/pkgconfig
mkdir -p $PKG/usr/libexec/webkit2gtk-4.0
mkdir -p $PKG/usr/include/webkitgtk-4.0
mkdir -p $PKG/usr/share/gtk-doc/html/webkit{2,dom}gtk-4.0

I'm tempted to copy bin/* to $PKG/usr/bin, lib/* to $PKG/usr/lib$LIBDIRSUFFIX/webkit2gtk-4.0,
the *.pc files to the pkgconfig directory ...

I tried to change the INSTALLATION DESTINATION PATH in the different cmake_install.cmake (with a seder) but when I run
Code:

make install
this starts building the objects again ...

ponce 04-26-2017 07:59 AM

have you tried using the SlackBuild from SBo?

https://gitlab.com/SlackBuilds.org/s...ies/webkit2gtk

I point you at the gitlab mirror of the SBo repository because ATM the server is not reachable probably for a network issue upstream (as you might guess with traceroute).

vonbiber 04-26-2017 10:19 AM

Quote:

Originally Posted by ponce (Post 5702429)
have you tried using the SlackBuild from SBo?

https://gitlab.com/SlackBuilds.org/s...ies/webkit2gtk

I just looked at the SlackBuild:

Code:

make install DESTDIR=$PKG
But there's no DESTDIR in the Makefile
I'm afraid this will try to install at the root filesystem

Skaendo 04-26-2017 10:42 AM

Quote:

Originally Posted by vonbiber (Post 5702491)
Code:

make install DESTDIR=$PKG
But there's no DESTDIR in the Makefile
I'm afraid this will try to install at the root filesystem

$PKG is a variable defined in the SlackBuild. If you look up in the SlackBuild you can see that it points to:
Code:

PKG=$TMP/package-$PRGNAM
which breaks down to /tmp/SBo/package-webkit2gtk

Edit: Ooops, I forgot to mention like ponce does below, that DESTDIR is recognized by cmake already.

ponce 04-26-2017 10:44 AM

Quote:

Originally Posted by vonbiber (Post 5702491)
I just looked at the SlackBuild:

Code:

make install DESTDIR=$PKG
But there's no DESTDIR in the Makefile
I'm afraid this will try to install at the root filesystem

you don't have to be.
if you look at the Makefile in the build directory (generated by running cmake), it calls several other Makefile in the subdirectories of ./build: those, for the "install" target call theirself the relative cmake_install.cmake files that contain references to DESTDIR.
Code:

/tmp/SBo/webkitgtk-2.16.1/build# find . -name cmake_install.cmake -exec grep DESTDIR {} \;
  if(EXISTS "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/WebKitPluginProcess2" AND
    NOT IS_SYMLINK "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/WebKitPluginProcess2")
      execute_process(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/WebKitPluginProcess2")
  if(EXISTS "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so" AND
    NOT IS_SYMLINK "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so")
      execute_process(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so")
  if(EXISTS "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/WebKitPluginProcess" AND
    NOT IS_SYMLINK "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/WebKitPluginProcess")
      execute_process(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/WebKitPluginProcess")
  if(EXISTS "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/WebKitDatabaseProcess" AND
    NOT IS_SYMLINK "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/WebKitDatabaseProcess")
      execute_process(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/WebKitDatabaseProcess")
      "$ENV{DESTDIR}/usr/lib64/libwebkit2gtk-4.0.so.37.19.4"
      "$ENV{DESTDIR}/usr/lib64/libwebkit2gtk-4.0.so.37"
      "$ENV{DESTDIR}/usr/lib64/libwebkit2gtk-4.0.so"
  if(EXISTS "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/WebKitWebProcess" AND
    NOT IS_SYMLINK "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/WebKitWebProcess")
      execute_process(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/WebKitWebProcess")
  if(EXISTS "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/WebKitNetworkProcess" AND
    NOT IS_SYMLINK "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/WebKitNetworkProcess")
      execute_process(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/WebKitNetworkProcess")
  if(EXISTS "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/jsc" AND
    NOT IS_SYMLINK "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/jsc")
      execute_process(COMMAND "/usr/bin/strip" "$ENV{DESTDIR}/usr/lib64/webkit2gtk-4.0/jsc")
      "$ENV{DESTDIR}/usr/lib64/libjavascriptcoregtk-4.0.so.18.5.8"
      "$ENV{DESTDIR}/usr/lib64/libjavascriptcoregtk-4.0.so.18"
      "$ENV{DESTDIR}/usr/lib64/libjavascriptcoregtk-4.0.so"


vonbiber 04-27-2017 05:56 AM

Quote:

Originally Posted by ponce (Post 5702497)
you don't have to be.
if you look at the Makefile in the build directory (generated by running cmake), it calls several other Makefile in the subdirectories of ./build: those, for the "install" target call theirself the relative cmake_install.cmake files that contain references to DESTDIR.

Thank you for pointing out this to me.
By the way
Code:

make
make install DESTDIR=$PKG

is a waste of time.
Code:

make install DESTDIR=$PKG
is enough (it will (re)build even if you 'make'd before)

Thanks again
Now, where's this solved button again?


All times are GMT -5. The time now is 10:14 AM.