Package Details: draftsight 2019SP1-1

Git Clone URL: https://aur.archlinux.org/draftsight.git (read-only, click to copy)
Package Base: draftsight
Description: Freeware CAD software for DWG/DXF files.
Upstream URL: http://www.3ds.com/products/draftsight/
Keywords: CAD DWG DXF
Licenses: custom
Submitter: jstamant
Maintainer: oberon2007
Last Packager: oberon2007
Votes: 62
Popularity: 0.28
First Submitted: 2015-08-10 00:05
Last Updated: 2019-08-25 21:24

Dependencies (21)

Required by (0)

Sources (2)

Latest Comments

1 2 3 4 5 6 ... Next › Last »

durotan commented on 2019-09-26 13:50

DraftSight Service Pack 2019 SP2 is now available

sl1pkn07 commented on 2019-08-29 17:19

what is the error? with untouch pkgbuild i cant launch the program, appears a window with text something like (in spanish in my case) "this program is unable to load, fail when load the modules. please reinstall" and button with ok, the push the buttom then the program is closed

oberon2007 commented on 2019-08-27 22:53

Hi @sl1pkn07 thank you for the patch. My problem here is that my latest pkg version is launching fine while your version doesn't launch at all for me ... ?

sl1pkn07 commented on 2019-08-27 21:58

my changes in the PKGBUILD:

  • use system Qt/libicu
  • use bundled .desktop
  • fix wrong symlinks
  • update depends
  • fix insecure RPATH (chrpath)
  • quoted $pkgdir and $srcdir (breaked if use dorectories with spaces)
  • sha256sums
diff --git a/PKGBUILD b/PKGBUILD
index 25ae2f9..e33ed3b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,58 +6,64 @@ pkgver=2019SP1
 pkgrel=1
 pkgdesc="Freeware CAD software for DWG/DXF files."
 arch=('x86_64')
-url="http://www.3ds.com/products/$pkgname/"
+url="http://www.3ds.com/products/draftsight"
 license=('custom')
-depends=('alsa-lib'
-         'desktop-file-utils'
-         'fontconfig'
-         'gcc-libs'
-         'glib2'
-         'gtk2'
-         'libcups'
-         'libgl'
-         'libice'
-         'libmariadbclient'
-         'libmng'
-         'libpng12'
-         'libsm'
-         'libx11'
-         'libxext'
-         'libxrender'
-         'libxslt'
-         'postgresql-libs'
-         'qt5-base'
+source=("draftsight-${pkgver}::http://dl-ak.solidworks.com/nonsecure/draftsight/${pkgver}/draftSight.rpm")
+sha256sums=('b79c8425f2d0f71f51116e708bb66e3727c6d66eafd8afc6d3633bb99d66c294')
+depends=('qt5-svg'
          'qt5-x11extras'
-         'zlib')
-source=("$pkgname-$pkgver::http://dl-ak.solidworks.com/nonsecure/$pkgname/$pkgver/draftSight.rpm"
-        "$pkgname.desktop")
-md5sums=('6f4f0957da481fdf3acdd695808feab2'
-         '70904e450823c6978f242435d414e0fc')
-
+         'qt5-websockets'
+         'qt5-tools'
+         'sane'
+         'desktop-file-utils'
+         )
+makedepends=('chrpath')
+optdepend=('bash: run bash scripts')
 _pkgprefix='opt/dassault-systemes/DraftSight'

 package() {
-  mkdir -p $pkgdir/$_pkgprefix
-  cd $srcdir/$_pkgprefix
-  install -Dm644 Eula/english/eula.htm $pkgdir/usr/share/licenses/$pkgname/LICENSE
+  mkdir -p "${pkgdir}/${_pkgprefix}"
+  cd "${srcdir}/${_pkgprefix}"
+  install -Dm644 Eula/english/eula.htm "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

   for size in "16x16" "32x32" "48x48" "64x64" "128x128"
   do
-    install -Dm644 Resources/pixmaps/$size/program.png $pkgdir/usr/share/icons/hicolor/$size/apps/$pkgname.png
-    install -Dm644 Resources/pixmaps/$size/file-dwg.png $pkgdir/usr/share/icons/hicolor/$size/mimetypes/file-dwg.png
-    install -Dm644 Resources/pixmaps/$size/file-dxf.png $pkgdir/usr/share/icons/hicolor/$size/mimetypes/file-dxf.png
-    install -Dm644 Resources/pixmaps/$size/file-dwt.png $pkgdir/usr/share/icons/hicolor/$size/mimetypes/file-dwt.png
+    install -Dm644 "Resources/pixmaps/${size}/program.png" "${pkgdir}/usr/share/icons/hicolor/${size}/apps/dassault-systemes.draftsight.png"
+    install -Dm644 "Resources/pixmaps/${size}/file-dwg.png" "${pkgdir}/usr/share/icons/hicolor/${size}/mimetypes/file-dwg.png"
+    install -Dm644 "Resources/pixmaps/${size}/file-dxf.png" "${pkgdir}/usr/share/icons/hicolor/${size}/mimetypes/file-dxf.png"
+    install -Dm644 "Resources/pixmaps/${size}/file-dwt.png" "${pkgdir}/usr/share/icons/hicolor/${size}/mimetypes/file-dwt.png"
   done

-  install -Dm644 Resources/dassault-systemes_$pkgname-dwg.xml $pkgdir/usr/share/mime/application/dassault-systemes_$pkgname-dwg.xml
-  install -Dm644 Resources/dassault-systemes_$pkgname-dxf.xml $pkgdir/usr/share/mime/application/dassault-systemes_$pkgname-dxf.xml
-  install -Dm644 Resources/dassault-systemes_$pkgname-dwt.xml $pkgdir/usr/share/mime/application/dassault-systemes_$pkgname-dwt.xml
+  install -Dm644 Resources/dassault-systemes_draftsight-dwg.xml "${pkgdir}/usr/share/mime/application/dassault-systemes_draftsight-dwg.xml"
+  install -Dm644 Resources/dassault-systemes_draftsight-dxf.xml "${pkgdir}/usr/share/mime/application/dassault-systemes_draftsight-dxf.xml"
+  install -Dm644 Resources/dassault-systemes_draftsight-dwt.xml "${pkgdir}/usr/share/mime/application/dassault-systemes_draftsight-dwt.xml"

-  install -Dm644 $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
+  install -Dm644 Resources/dassault-systemes_draftsight.desktop "${pkgdir}/usr/share/applications/dassault-systemes_draftsight.desktop"

   # Install Draftsight's program files
-  cp -pr $srcdir/$_pkgprefix/* $pkgdir/$_pkgprefix/
+  cp -pr "${srcdir}/${_pkgprefix}/"* "${pkgdir}/${_pkgprefix}"
+
+  # fix wrong symlinks
+  ln -sf './libdsInterface.so.1.0.0' "${pkgdir}/${_pkgprefix}/APISDK/lib/cpp/libdsInterface.so.1.0"
+  ln -sf './libdsInterface.so.1.0.0' "${pkgdir}/${_pkgprefix}/APISDK/lib/cpp/libdsInterface.so.1"
+  ln -sf './libdsInterface.so.1.0.0' "${pkgdir}/${_pkgprefix}/APISDK/lib/cpp/libdsInterface.so"
+  ln -sf './libdsLibrary.so.1.0.0' "${pkgdir}/${_pkgprefix}/APISDK/lib/cpp/libdsLibrary.so.1.0"
+  ln -sf './libdsLibrary.so.1.0.0' "${pkgdir}/${_pkgprefix}/APISDK/lib/cpp/libdsLibrary.so.1"
+  ln -sf './libdsLibrary.so.1.0.0' "${pkgdir}/${_pkgprefix}/APISDK/lib/cpp/libdsLibrary.so"
+
+  # use system libraries
+  rm -fr "${pkgdir}/${_pkgprefix}/Libraries/"libQt*
+  rm -fr "${pkgdir}/${_pkgprefix}/Libraries/"libicu*
+  rm -fr "${pkgdir}/${_pkgprefix}/PlugIns/QtPlugIns"
+  rm -fr "${pkgdir}/${_pkgprefix}/Linux/qt.conf"

-  # fix pdf export module lib load
-  ln -s /usr/lib/libpcre.so.1 $pkgdir/opt/dassault-systemes/DraftSight/Libraries/libpcre.so.3
+  # fix insecure rpath (SDK samples needs a lot of work. only change the basic)
+  chrpath -r '../Libraries' "${pkgdir}/${_pkgprefix}/Linux/dsHttpApiController"
+  chrpath -r '../Libraries' "${pkgdir}/${_pkgprefix}/Linux/dsHttpApiService"
+  chrpath -r '../Libraries' "${pkgdir}/${_pkgprefix}/Libraries/WinBitmap.txv"
+  chrpath -r '../Libraries' "${pkgdir}/${_pkgprefix}/Libraries/WinOpenGL.txv"
+  chrpath -r '../Libraries' "${pkgdir}/${_pkgprefix}/Libraries/libDSImportSVGAddin.so.1.0.0"
+  chrpath -r '../Libraries' "${pkgdir}/${_pkgprefix}/APISDK/lib/cpp/libdsInterface.so.1.0.0"
+  chrpath -r '../Libraries' "${pkgdir}/${_pkgprefix}/APISDK/lib/cpp/libdsLibrary.so.1.0.0"
+  chrpath -d "${pkgdir}/${_pkgprefix}/Linux/DWGConverter"
 }

greetings

sl1pkn07 commented on 2019-08-27 15:34

rpm scripts from official rpm

└───╼  rpm -qp --scripts draftSight.rpm
postinstall scriptlet (using /bin/sh):

cd "//opt/dassault-systemes/DraftSight/Resources" && xdg-mime install --novendor --mode system "dassault-systemes_draftsight-dwg.xml"
cd "//opt/dassault-systemes/DraftSight/Resources" && xdg-mime install --novendor --mode system "dassault-systemes_draftsight-dxf.xml"
cd "//opt/dassault-systemes/DraftSight/Resources" && xdg-mime install --novendor --mode system "dassault-systemes_draftsight-dwt.xml"

# TODO: Set mime types "application/vnd.dassault-systems.*" for all users

for SIZE in 16 32 48 64 128; do
    OPTS="--noupdate --novendor --mode system --size ${SIZE}"
    cd "//opt/dassault-systemes/DraftSight/Resources/pixmaps/${SIZE}x${SIZE}"
    xdg-icon-resource install ${OPTS} --context apps "program.png" "dassault-systemes.draftsight"
    xdg-icon-resource install ${OPTS} --context apps --theme gnome "program.png" "dassault-systemes.draftsight"
    xdg-icon-resource install ${OPTS} --context mimetypes "file-dwg.png" "application-vnd.dassault-systemes.draftsight-dwg"
    xdg-icon-resource install ${OPTS} --context mimetypes --theme gnome "file-dwg.png" "application-vnd.dassault-systemes.draftsight-dwg"
    xdg-icon-resource install ${OPTS} --context mimetypes "file-dxf.png" "application-vnd.dassault-systemes.draftsight-dxf"
    xdg-icon-resource install ${OPTS} --context mimetypes --theme gnome "file-dxf.png" "application-vnd.dassault-systemes.draftsight-dxf"
    xdg-icon-resource install ${OPTS} --context mimetypes "file-dwt.png" "application-vnd.dassault-systemes.draftsight-dwt"
    xdg-icon-resource install ${OPTS} --context mimetypes --theme gnome "file-dwt.png" "application-vnd.dassault-systemes.draftsight-dwt"
done

xdg-icon-resource forceupdate
cd "//opt/dassault-systemes/DraftSight/Resources" && xdg-desktop-menu install --novendor --mode system "dassault-systemes_draftsight.desktop"
[ -x /usr/sbin/update-mime ] && /usr/sbin/update-mime

# prepare for dongle
if [ /etc/udev/rules.d/ ]; then
  echo "BUS==\"usb\", SYSFS{idVendor}==\"096e\", MODE==\"0666\""> /etc/udev/rules.d/ft-rockey.rules
fi
# TODO: Install libaudio.so from package. Why?

# TODO: Install libaudio.so from package. Why?

# issue 56221
# should be removed when switch to Ubuntu 14.04
paths=(
  "/lib/x86_64-linux-gnu/libudev.so.1" # Ubuntu, Xubuntu, Mint
  "/usr/lib64/libudev.so.1" # SUSE, Fedora
  "/usr/lib/libudev.so.1" # Arch, Fedora 32bit
  "/lib/i386-linux-gnu/libudev.so.1" # Ubuntu 32bit
)
for i in "${paths[@]}"
do
  if [ -f $i ]
  then
    ln -sf "$i" "/opt/dassault-systemes/DraftSight/Libraries/libudev.so.0"
    break
  fi
done

# DESKTOP-76539
paths=(
  "/usr/lib64/libpcre.so.1" # Fedora 27
)
for i in "${paths[@]}"
do
  if [ -f $i ]
  then
    ln -sf "$i" "/opt/dassault-systemes/DraftSight/Libraries/libpcre.so.3"
    break
  fi
done
preuninstall scriptlet (using /bin/sh):

xdg-mime uninstall --novendor --mode system "//opt/dassault-systemes/DraftSight/Resources/dassault-systemes_draftsight-dwg.xml"
xdg-mime uninstall --novendor --mode system "//opt/dassault-systemes/DraftSight/Resources/dassault-systemes_draftsight-dxf.xml"
xdg-mime uninstall --novendor --mode system "//opt/dassault-systemes/DraftSight/Resources/dassault-systemes_draftsight-dwt.xml"

for SIZE in 16 32 48 64 128; do
    OPTS="--noupdate --mode system --size ${SIZE}"
    xdg-icon-resource uninstall ${OPTS} --context apps "dassault-systemes.draftsight"
    xdg-icon-resource uninstall ${OPTS} --context apps --theme gnome "dassault-systemes.draftsight"
    xdg-icon-resource uninstall ${OPTS} --context mimetypes "application-vnd.dassault-systemes.draftsight-dwg"
    xdg-icon-resource uninstall ${OPTS} --context mimetypes --theme gnome "application-vnd.dassault-systemes.draftsight-dwg"
    xdg-icon-resource uninstall ${OPTS} --context mimetypes "application-vnd.dassault-systemes.draftsight-dxf"
    xdg-icon-resource uninstall ${OPTS} --context mimetypes --theme gnome "application-vnd.dassault-systemes.draftsight-dxf"
    xdg-icon-resource uninstall ${OPTS} --context mimetypes "application-vnd.dassault-systemes.draftsight-dwt"
    xdg-icon-resource uninstall ${OPTS} --context mimetypes --theme gnome "application-vnd.dassault-systemes.draftsight-dwt"
done

xdg-icon-resource forceupdate
cd "//opt/dassault-systemes/DraftSight/Resources" && xdg-desktop-menu uninstall --novendor --mode system "dassault-systemes_draftsight.desktop"
[ -x /usr/sbin/update-mime ] && /usr/sbin/update-mime

# remove dongle preparing
[ /etc/udev/rules.d/ ] && rm /etc/udev/rules.d/ft-rockey.rules

sl1pkn07 commented on 2019-08-27 15:25

i can't open the program. error when load the modules

ecocode commented on 2019-08-16 07:44

Awesome. PDF export with the symlink works like a charm with DraftSight 2019 SP1 ! Thanks

jb1 commented on 2019-08-16 07:18

For those of you having problems with "Error (10000): PDF export module cannot be loaded", try creating the following symlink:

ln -s /usr/lib/libpcre.so.1 /opt/dassault-systemes/DraftSight/Libraries/libpcre.so.3

kuasha420 commented on 2019-07-12 01:00

Exec=env LD_PRELOAD=/usr/lib/libfreetype.so --unset=XDG_CURRENT_DESKTOP --unset=DESKTOP_SESSION --unset=GNOME_DESKTOP_SESSION_ID vblank_mode=0 /opt/dassault-systemes/DraftSight/Linux/DraftSight %U

Why are these XDG values unset and what does vblank_mode do here?

mininumininu commented on 2019-06-29 14:40

The only solution that i found for the pdf problem was to downgrade the pkg back to 2018SP3, when was working. I'was lucky and had the pkg on my cache, because aparently dassault has removed the link for past versions. If you also want to downgrade the pkg, first you need to locate the old pkg (draftsight-2018SP3-1-x86_64.pkg.tar or some like this) on you system, and it depends on whats method you use to manage AUR pkgs. If you use some AUR helpers, like yay or yaourt, posibly was on the "~/.cache/youraurhelper/draftsight". Anyway, once found the pkg, y can downgrade throungh "pacman -U /var/cache/pacman/pkg/package-old_version.pkg.tar.xz"