Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set library directory suffix #31

Closed
ryanpcmcquen opened this issue Jan 2, 2015 · 3 comments
Closed

Unable to set library directory suffix #31

ryanpcmcquen opened this issue Jan 2, 2015 · 3 comments

Comments

@ryanpcmcquen
Copy link

Firstly, thanks for this wonderful desktop environment and for making it portable! I was surprised at how easy it was to port to Slackware. ;-)

http://slackbuilds.org/cgit/slackbuilds/tree/desktop/lumina/lumina.SlackBuild?id=e06670b2dcd55e237a21da841da193cc9f82fb91

There is my lumina build script. Here are the important parts:

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi
if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

qmake \
  PREFIX=/usr \
  LIBDIR=/usr/lib${LIBDIRSUFFIX} \
  QMAKE_CFLAGS="$SLKCFLAGS" \
  QMAKE_CXXFLAGS="$SLKCFLAGS"

make -j1 \
  OPTS="$SLKCFLAGS" \
  LIBDIR=/usr/lib${LIBDIRSUFFIX} \
  PREFIX=/usr

make install \
  INSTALL_ROOT=$PKG \
  DESTDIR=$PKG

if [ $LIBDIRSUFFIX = "64" ]; then
  mkdir -pv $PKG/usr/lib${LIBDIRSUFFIX}
  mv -v $PKG/usr/lib/* $PKG/usr/lib${LIBDIRSUFFIX}/
  rm -rf $PKG/usr/lib
fi

As you see, despite setting the library path to /usr/lib64 (on 64-bit only), I still have to manually move the libraries. Everything works as expected, but it'd be nice if the build respected this setting.

Thanks.

@beanpole135
Copy link
Collaborator

Glad you like the portability of it! I try to keep things tidy... :-)

From looking over your build script highlights, it sounds like you just need an extra variable to be able to pass into the Qt project file for additional library directories. I will look into adding that functionality into the libLumina build process here soon. Since we already have to account for a custom PREFIX, I am thinking of just adding a variable to that same script so that you can also pass in a custom LIBDIR (Example: $PREFIX/$LIBDIR for the build library directory instead of the current $PREFIX/lib)

@beanpole135
Copy link
Collaborator

Ok, I just made the changes[1]. Now you should be able to just pass the "LIBPREFIX" variable into your qmake command to build all the projects (full directory path - default is $PREFIX/lib if not set).

Example: "qmake PREFIX=/usr LIBPREFIX=/usr/lib64"

[1] 4d7afcb

@ryanpcmcquen
Copy link
Author

So fast! Thanks a bunch! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants