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

New package: fritzing #7376

Merged
merged 7 commits into from
Dec 7, 2020
Merged

New package: fritzing #7376

merged 7 commits into from
Dec 7, 2020

Conversation

jeremyd2019
Copy link
Member

@jeremyd2019 jeremyd2019 commented Dec 3, 2020

My first attempt at packaging something.

The Fritzing application is an Electronic Design Automation software with a low entry barrier, suited for the needs of makers and hobbyists. It offers a unique real-life "breadboard" view, and a parts library with many commonly used high-level components. Fritzing makes it very easy to communicate about circuits, as well as to turn them into PCB layouts ready for production. It is particularly popular among Arduino and Raspberry Pi users, and is widely used in education and creative tinkering.

https://fritzing.org
https://github.com/fritzing/fritzing-app

Major outstandingsolved issue is that Fritzing cannot find its files out of the box. This can be worked around by launching Fritzing -f /mingw{32,64}/share/fritzing. It passes path defines to the compiler, but I found that in order for qmake to allow make install to work properly I had to use MSYS2_ARG_CONV_EXCL="PREFIX=". That results in that define using a path starting with /mingw64. Not that the alternative would have been better, since that was an absolute path on the GHA builder... Also, the code that uses that is ifdef'd out on QT_OS_WIN. Is there some common solution for mingw programs to know their prefix, so they can find their installed files?

A couple of points of oddness about this package:

  • Fritzing is no longer officially supported on 32-bit. However, it does still build and seems to run fine.
  • Fritzing keeps its parts database in a git repository, and uses libgit2 to keep it up to date. This resulted in a bit of a song-and-dance with git to turn the fritzing-parts checkout from makepkg into a self-contained git repo with the proper origin url and branch name.

@Biswa96
Copy link
Member

Biswa96 commented Dec 3, 2020

Is there some common solution for mingw programs to know their prefix

I am not sure about your desired solution. Extrapolating from the /mingw{32,64}/share/fritzing path, I think mingw-w64-mdloader/01-get-applet-path.patch file may help here. BTW, if the patches are in upstream repository a little comment with the commit hash will be useful.

Seems to be the best option since the prefix isn't known at build time.
@jeremyd2019
Copy link
Member Author

I am not sure about your desired solution. Extrapolating from the /mingw{32,64}/share/fritzing path, I think mingw-w64-mdloader/01-get-applet-path.patch file may help here.

Yeah, relative to the executable was kind of what I was thinking, too...

BTW, if the patches are in upstream repository a little comment with the commit hash will be useful.

One was cherry-picked. Comment added. I'm planning to submit the other numbered patches as a pull request upstream, for mingw support.

@jeremyd2019
Copy link
Member Author

The patch switching to the unix behavior for looking for files on mingw, and adding ../share/fritzing relative to to the executable's location as a candidate, seems to work well. Also, I noticed that calling uname -m from qmake to determine whether it was a 32 or 64-bit build did not work correctly, despite my recollection that uname output was changed based on MSYSTEM. I switched it to use the $MSYSTEM_CARCH environment variable instead.

@jeremyd2019 jeremyd2019 marked this pull request as ready for review December 3, 2020 19:02
mingw-w64-fritzing/PKGBUILD Outdated Show resolved Hide resolved
Fritzing will just update to the latest master commit at launch, so it
doesn't really matter other than for package build reproducibility.
This is what upstream uses in their packages, and reduces the .git
directory from ~140MB to ~24MB.
@lazka lazka merged commit eaefba2 into msys2:master Dec 7, 2020
@jeremyd2019 jeremyd2019 deleted the add-fritzing-package branch December 8, 2020 21:35
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

Successfully merging this pull request may close these issues.

3 participants