← Back to team overview

maria-developers team mailing list archive

Re: [Commits] 370ab48: MDEV-9209 - [PATCH] scripts: Do not prepend the prefix to absolute paths

 

Hi Sergei,

On Tue, Dec 22, 2015 at 01:27:48PM +0100, Sergei Golubchik wrote:
> Hi, Sergey!
> 
> On Dec 18, Sergey Vojtovich wrote:
> > revision-id: 370ab48e9fcf4bc15ffa5e313fc34aa97981a832 (mariadb-10.1.9-24-g370ab48)
> > parent(s): 428e09a789a17211de9b4f0a2c4c1226d5dcf993
> > committer: Sergey Vojtovich
> > timestamp: 2015-12-18 16:50:03 +0400
> > message:
> > 
> > MDEV-9209 - [PATCH] scripts: Do not prepend the prefix to absolute paths
> > 
> > Allow absolute paths for INSTALL_*DIR.
> 
> Okay, I agree now. Let's use your approach :)
> See below, one minor issue in mariadb.pc file.
> 
> > diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
> > index eb78016..54289c0 100644
> > --- a/scripts/CMakeLists.txt
> > +++ b/scripts/CMakeLists.txt
> >  
> >  IF(UNIX)
> >  CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.sh
> >    ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db ESCAPE_QUOTES @ONLY)
> > -  SET(DEST ${INSTALL_SCRIPTDIR})
> >    SET(EXT)
> 
> you can remove EXT as well, it's apparently not used anymore.
Removed.

> 
> >    EXECUTE_PROCESS(
> >    COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db
> > diff --git a/support-files/mariadb.pc.in b/support-files/mariadb.pc.in
> > index bc84a5c..0605d86 100644
> > --- a/support-files/mariadb.pc.in
> > +++ b/support-files/mariadb.pc.in
> > @@ -1,18 +1,18 @@
> >  # these four variables are present in almost every .pc file
> >  prefix=@CMAKE_INSTALL_PREFIX@
> >  exec_prefix=${prefix}
> > -libdir=${prefix}/@INSTALL_LIBDIR@
> > -includedir=${prefix}/@INSTALL_INCLUDEDIR@
> > +libdir=@INSTALL_LIBDIRABS@
> > +includedir=@INSTALL_INCLUDEDIRABS@
> 
> This is, strictly speaking, incorrect. In the old version one can change
> prefix to any other value and all other paths will auto-adjust. See:
> 
> $ pkg-config --libs openrc 
> -L/lib64 -lrc 
> $ pkg-config --libs openrc --define-variable=prefix=/opt
> -L/opt/lib64 -lrc 
Nice, I didn't know it's useful. I reverted all changes to mariadb.pc.in.
I assume this patch is ok to push now: https://github.com/MariaDB/server/commit/d464a47d0cfaf8486444edfa78180167d9f6b73a

Thanks,
Sergey


Follow ups

References