Index: head/comms/cqrlog/Makefile =================================================================== --- head/comms/cqrlog/Makefile (revision 477435) +++ head/comms/cqrlog/Makefile (revision 477436) @@ -1,69 +1,70 @@ # Created by: Stephen Hurd # $FreeBSD$ PORTNAME= cqrlog PORTVERSION= 2.3.0 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= comms hamradio PKGNAMESUFFIX= ${LAZARUS_PKGNAMESUFFIX} MAINTAINER= hamradio@FreeBSD.org COMMENT= Amateur Radio logging application LICENSE= GPLv2 LIB_DEPENDS= libhamlib.so:comms/hamlib -USES= fpc lazarus:flavors shebangfix ssl:run dos2unix +USES= fpc lazarus:flavors shebangfix ssl:run dos2unix mysql USE_GITHUB= yes GH_ACCOUNT= ok2cqr SHEBANG_FILES= tools/cqrlog-apparmor-fix \ voice_keyer/voice_keyer.sh USE_FPC= cairo fcl-base chm fcl-db fcl-image fcl-json fcl-net fcl-web \ fcl-registry rtl-extra fcl-xml mysql numlib openssl \ pasjpeg regexpr x11 ALL_TARGET= ${PORTNAME} MAKE_ENV+= LAZBUILD_CMD="${LAZBUILD_CMD}" \ LAZBUILD_ARGS="${LAZBUILD_ARGS}" \ LCL_PLATFORM="${LCL_PLATFORM}" \ LAZARUS_DIR="${LAZARUS_DIR}" USE_XORG+= x11 NO_LAZBUILD= yes LAZBUILD_ARGS= -d --pcp=. LAZARUS_NO_FLAVORS=qt5 INSTALLS_ICONS= yes DOS2UNIX_WRKSRC=${WRKSRC}/src/synapse/ gtk2_CONFLICTS_INSTALL= ${PORTNAME}-qt4 qt4_CONFLICTS_INSTALL= ${PORTNAME}-gtk2 post-extract: @${RM} -r ${WRKSRC}/src/lnet/lib/openssl.pas post-patch: @${SED} -e s!%%LOCALBASE%%!${LOCALBASE}!g \ -e s!%%MAKE_CMD%%!${MAKE_CMD}!g \ -e s!%%LAZARUSDIR%%!${LAZARUS_DIR}!g \ ${FILESDIR}/environmentoptions.xml.in \ > ${WRKSRC}/environmentoptions.xml ${REINPLACE_CMD} -e s!%%LOCALBASE%%!${LOCALBASE}!g \ ${WRKSRC}/help/cwd.html ${WRKSRC}/help/h1.html \ ${WRKSRC}/src/cqrlog.lpi ${WRKSRC}/src/dData.pas \ ${WRKSRC}/src/dUtils.pas \ ${WRKSRC}/src/fLoTWExport.pas ${WRKSRC}/src/fLoTWExport.lfm \ ${WRKSRC}/src/fPreferences.pas ${WRKSRC}/src/fRotControl.pas \ ${WRKSRC}/src/fTRXControl.pas ${WRKSRC}/src/fGrayline.pas \ ${WRKSRC}/src/fPreferences.lfm ${WRKSRC}/src/fPreferences.pas ${REINPLACE_CMD} -e s!%%DATADIR%%!${DATADIR}!g \ ${WRKSRC}/src/dData.pas ${WRKSRC}/src/fGrayline.pas ${REINPLACE_CMD} -e s!Linux!FreeBSD!g \ ${WRKSRC}/src/fMain.lfm ${REINPLACE_CMD} -e s!%%OPENSSLLIB%%!${OPENSSLLIB}!g \ ${WRKSRC}/src/synapse/ssl_openssl_lib.pas ${RM} -r ${WRKSRC}/src/mysql .include Index: head/comms/cqrlog/files/patch-src_dData.pas =================================================================== --- head/comms/cqrlog/files/patch-src_dData.pas (revision 477435) +++ head/comms/cqrlog/files/patch-src_dData.pas (revision 477436) @@ -1,94 +1,102 @@ ---- src/dData.pas.orig 2018-07-11 03:36:41 UTC +--- src/dData.pas.orig 2018-06-17 12:42:42 UTC +++ src/dData.pas @@ -904,22 +904,22 @@ begin if not DirectoryExistsUTF8(fHomeDir+'members') then CreateDirUTF8(fHomeDir+'members'); fMembersDir := fHomeDir+'members'+PathDelim; - fGlobalMembersDir := ExpandFileNameUTF8('..'+PathDelim+'share'+PathDelim+'cqrlog'+ + fGlobalMembersDir := ExpandFileNameUTF8('%%DATADIR%%'+PathDelim+'share'+PathDelim+'cqrlog'+ PathDelim+'members'+PathDelim); if DirectoryExistsUTF8(fHomeDir+'zipcodes') then fZipCodeDir := fHomeDir+'zipcodes'+PathDelim else - fZipCodeDir := ExpandFileNameUTF8('..'+PathDelim+'share'+PathDelim+'cqrlog')+ + fZipCodeDir := ExpandFileNameUTF8('%%DATADIR%%'+PathDelim+'share'+PathDelim+'cqrlog')+ PathDelim+'zipcodes'+PathDelim; if not DirectoryExistsUTF8(fHomeDir+'images') then CreateDirUTF8(fHomeDir+'images'); - fHelpDir := ExpandFileNameUTF8('..'+PathDelim+'share'+PathDelim+'cqrlog'+ + fHelpDir := ExpandFileNameUTF8('%%DATADIR%%'+PathDelim+'share'+PathDelim+'cqrlog'+ PathDelim+'help'+PathDelim); - fShareDir := ExpandFileNameUTF8('..'+PathDelim+'share'+PathDelim+'cqrlog'+ + fShareDir := ExpandFileNameUTF8('%%DATADIR%%'+PathDelim+'share'+PathDelim+'cqrlog'+ PathDelim); if not DirectoryExistsUTF8(fHomeDir + 'lotw') then @@ -942,7 +942,7 @@ procedure TdmData.PrepareCtyData; var s,d : String; begin - s := ExpandFileNameUTF8('..'+PathDelim+'share'+PathDelim+'cqrlog'+PathDelim+'ctyfiles'+PathDelim); + s := ExpandFileNameUTF8('%%DATADIR%%'+PathDelim+'share'+PathDelim+'cqrlog'+PathDelim+'ctyfiles'+PathDelim); d := fHomeDir+'ctyfiles'+PathDelim; if not FileExistsUTF8(fHomeDir+'ctyfiles'+PathDelim+'AreaOK1RR.tbl') then @@ -1015,7 +1015,7 @@ procedure TdmData.PrepareXplanetDir; var s,d : String; begin - s := ExpandFileNameUTF8('..'+PathDelim+'share'+PathDelim+'cqrlog'+PathDelim+'xplanet'+PathDelim); + s := ExpandFileNameUTF8('%%DATADIR%%'+PathDelim+'share'+PathDelim+'cqrlog'+PathDelim+'xplanet'+PathDelim); d := fHomeDir+'xplanet'+PathDelim; if not FileExistsUTF8(d+'geoconfig') then CopyFile(s+'geoconfig',d+'geoconfig') @@ -1025,7 +1025,7 @@ procedure TdmData.PrepareVoice_keyerDir; var s,d : String; begin - s := ExpandFileNameUTF8('..'+PathDelim+'share'+PathDelim+'cqrlog'+PathDelim+'voice_keyer'+PathDelim); + s := ExpandFileNameUTF8('%%DATADIR%%'+PathDelim+'share'+PathDelim+'cqrlog'+PathDelim+'voice_keyer'+PathDelim); d := fHomeDir+'voice_keyer'+PathDelim; if not FileExistsUTF8(d+'voice_keyer.sh') then CopyFile(s+'voice_keyer.sh',d+'voice_keyer.sh') @@ -3367,12 +3367,12 @@ var l : TStringList; info : String; begin - if FileExistsUTF8('/usr/bin/mysqld') then - Result := '/usr/bin/mysqld'; - if FileExistsUTF8('/usr/bin/mysqld_safe') then //Fedora - Result := '/usr/bin/mysqld_safe'; - if FileExistsUTF8('/usr/sbin/mysqld') then //openSUSE - Result := '/usr/sbin/mysqld'; + if FileExistsUTF8('%%LOCALBASE%%/bin/mysqld') then + Result := '%%LOCALBASE%%/bin/mysqld'; + if FileExistsUTF8('%%LOCALBASE%%/bin/mysqld_safe') then //Fedora + Result := '%%LOCALBASE%%/bin/mysqld_safe'; + if FileExistsUTF8('%%LOCALBASE%%/sbin/mysqld') then //openSUSE + Result := '%%LOCALBASE%%/sbin/mysqld'; if Result = '' then //don't know where mysqld is, so hopefully will be in $PATH Result := 'mysqld' end; -@@ -4209,17 +4209,7 @@ begin +@@ -4209,22 +4209,13 @@ begin Result := ''; Paths := TStringList.Create; try - Paths.Add('/usr/lib64/'); - Paths.Add('/lib64/'); - Paths.Add('/usr/lib/x86_64-linux-gnu/'); - Paths.Add('/usr/lib64/mysql/'); - Paths.Add('/lib/x86_64-linux-gnu/'); - - Paths.Add('/usr/lib/i386-linux-gnu/'); - Paths.Add('/lib/i386-linux-gnu/'); - Paths.Add('/usr/lib/'); - Paths.Add('/lib/'); - Paths.Add('/usr/lib/mysql/'); ++ Paths.Add('%%LOCALBASE%%/lib/mysql/'); + Paths.Add('%%LOCALBASE%%/lib/'); - Result := MyFindFile('libmariadbclient.so*', Paths); +- Result := MyFindFile('libmariadbclient.so*', Paths); ++ Result := MyFindFile('libmariadbclient.so', Paths); if (Result='') then + begin +- Result := MyFindFile('libmysqlclient.so*', Paths) ++ Result := MyFindFile('libmysqlclient.so', Paths) + end + finally + FreeAndNil(Paths)