> Good change removing the string replacement patch, this simplifies things
> a lot!
Yes this is not more needed, without this patch works LeoCad.
Please upload soon to SourceForge that i can lighter download and update
to newest Versions.
> Regarding the parts library:
> You have to decide if you want to use the LDraw library or use my version
> of the library. They are the same but it's faster to load models if you use
> my library and you don't need to run mklist.
> It looks like you have everything figured out if you use my library but
> if you want to use LDraw's library I'll have to make a few small source
> changes.
I use now in Makefile that user can choose if wish LeoCad or LDraw pieces.
But i have choosen to use yours LeoCad library. Thanks for all.
OPTIONS_SINGLE= LIBRARY
OPTIONS_SINGLE_LIBRARY= LDRAW LEOCAD
OPTIONS_DEFAULT= LEOCAD
LDRAW_DESC= Library from LDraw symlink, mostly fewer pieces
LEOCAD_DESC= Library from LeoCad file, mostly more pieces
...
.if ${PORT_OPTIONS:MLDRAW}
RUN_DEPENDS= ${LOCALBASE}/share/ldraw/models/car.dat:${PORTSDIR}/cad/ldraw
.endif
.if ${PORT_OPTIONS:MLEOCAD}
LEOCAD_PIECES= Library-Linux-7931.zip
DISTFILES+= ${LEOCAD_PIECES}
EXTRACT_DEPENDS=${UNZIP_CMD}:${PORTSDIR}/archivers/unzip
post-extract:
@${UNZIP_CMD} -q -o ${_DISTDIR}/${LEOCAD_PIECES} -d ${WRKDIR}/pieces
.endif
...
post-install:
@${MKDIR} ${STAGEDIR}${DATADIR}
.if ${PORT_OPTIONS:MLDRAW}
${LN} -s ${PREFIX}/share/ldraw ${STAGEDIR}${DATADIR}/library.bin
.endif
.if ${PORT_OPTIONS:MLEOCAD}
${INSTALL_DATA} ${WRKDIR}/pieces/* ${STAGEDIR}${DATADIR}
.endif
> I was looking at your Makefile and noticed a few more things:
> - You have libpng and libjpeg dependencies, those aren't needed
/usr/local/ports/local/In-Review/cad/leocad/work/leocad/ > grep -r png .
Many png images, also is needed.
/usr/local/ports/local/In-Review/cad/leocad/work/leocad/ > grep -r jpeg .
./qt/lc_qhtmldialog.ui: <string>JPEG</string>
./qt/lc_qimage.cpp: else if (strcmp(ext, "jpeg") == 0)
./qt/lc_qpropertiesdialog.cpp: QString result =
QFileDialog::getOpenFileName(this, tr("Select Background Image"),
ui->imageNameEdit->text(), tr("All Image Files (*.png *.jpg *.gif *.bmp);;PNG
Files (*.png);;JPEG Files (*.jpg);;GIF Files (*.gif);;BMP Files (*.bmp);;All
Files (*.*)"));
./qt/lc_qimagedialog.ui: <string>JPEG</string>
./qt/lc_qimagedialog.cpp: QString result =
QFileDialog::getSaveFileName(this, tr("Save Image File"), ui->fileName->text(),
tr("Supported Files (*.bmp *.png *.jpg);;BMP Files (*.bmp);;PNG Files
(*.png);;JPEG Files (*.jpg);;All Files (*.*)"));
./qt/lc_qimagedialog.cpp: if (extension == "bmp" || extension == "png" ||
extension == "jpg" || extension == "jpeg")
Used are jpeg images, also is needed.
> - You don't have a zlib dependency, it's needed
zlib is in FreeBSD base
/boot/kernel/zlib.ko
/usr/include/bzlib.h
/usr/include/net/zlib.h
/usr/include/zlib.h
> - There's a USE_GNOME in there, I don't know what it does but it's probably
> not needed
/usr/local/ports/local/In-Review/cad/leocad/work/leocad/ > grep -r gtk .
./qt/lc_qmainwindow.cpp: gtk_widget_set_sensitive (anim_toolbar.play,
bAnimation);
./qt/lc_qmainwindow.cpp: gtk_widget_set_sensitive (anim_toolbar.stop,
FALSE);
./qt/lc_qmainwindow.cpp: gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON(anim_toolbar.anim), bAnimation);
./qt/lc_qmainwindow.cpp: gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON(anim_toolbar.keys), bAddKeys);
...
Also is needed USE_GNOME=gtk20
> On Thu, Mar 6, 2014 at 1:08 PM, Rusmir Dusko <[email protected]> wrote:
> > On 06/03/14 03:27 PM, Rusmir Dusko wrote:
> > > I use in my FreeBSD port Makefile what is according to FreeBSD
> > > politics that all must be installed in /usr/local
> > >
> > > post-patch:
> > > @${REINPLACE_CMD} -e 's|/share/leocad/|/local/share/leocad/|' \
> > > ${WRKSRC}/qt/qtmain.cpp
> > > @${REINPLACE_CMD} -e 's|/usr|${PREFIX}|; \
> > > s|share/man/man1|man/man1|; \
> > > s|docs.files = docs/README.txt docs/CREDITS.txt
> docs/COPYING.txt|docs.files = |' \
> > ${WRKSRC}/${PORTNAME}.pro
> > >
> > > /usr/local/ports/local/In-Review/cad/leocad/work/leocad/ > grep -r
> "libPath = LC_INSTALL_PREFIX" .
> > > ./qt/qtmain.cpp: const char* libPath =
> LC_INSTALL_PREFIX"/local/share/leocad/";
> > > ./qt/qtmain.cpp.bak: const char* libPath =
> LC_INSTALL_PREFIX"/share/leocad/";
>
> > How about you use the qmake syntax to actually set the prefix and let
> > that kind of source patch for tinkering with it.
>
> > I use a non standard prefix and have no problem. I didn't patch the
> > source. This is ugly and bad.
>
>
> Thanks many I have now removed this patch
>
> # @${REINPLACE_CMD} -e 's|/share/leocad/|/local/share/leocad/|' \
> # ${WRKSRC}/qt/qtmain.cpp
>
> and when i use
>
> ln -s /usr/local/share/ldraw /usr/local/share/leocad/library.bin
>
> ls -l /usr/local/share/leocad
> total 1
> lrwxr-xr-x 1 root wheel 22 6 Mar 21:58 library.bin ->
> /usr/local/share/ldraw
>
> get when start LeoCad
>
> You are using the latest LeoCad version.
> There are new parts avaliable.
> Visit http://www.leocad.org/files/ to download.
>
>
> When i use library.bin from new Library-Linux-7931.zip
> get when start LeoCad
>
> You are using the latest LeoCad version.
> There are no new parts avaliable at this time.
>
> As said I think is best to upload LeoCad and pieces to SourceForge have
> good policy,
> that FreeBSD Makefile can good download from SourceForge what is not
> possible
> with Google Drive.
--
Best regards,
Rusmir Dusko
_______________________________________________
Leocad mailing list
[email protected]
https://list.gerf.org/listinfo/leocad