Bug 217076 - lang/dmd2: update to 2.073.0
Summary: lang/dmd2: update to 2.073.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-13 17:19 UTC by John Colvin
Modified: 2017-02-18 04:02 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (cy)


Attachments
svn diff for update to dmd 2.073.0 (66.14 KB, patch)
2017-02-13 17:19 UTC, John Colvin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Colvin 2017-02-13 17:19:25 UTC
Created attachment 179953 [details]
svn diff for update to dmd 2.073.0

This is my first message here, so apologies if I've missed or misunderstood any etiquette or rules. I'm also pretty new to FreeBSD and ports, so I may have done something stupid.

svn remove commands:

svn remove lang/dmd2/files/patch-src__dmd__posix.mak
svn remove lang/dmd2/files/patch-src-phobos-posix.mak
svn remove lang/dmd2/files/patch-src-druntime-posix.mak

I believe there are other simplifications that can be made, but I'm trying to keep things conservative to start with.
Comment 1 Cy Schubert freebsd_committer freebsd_triage 2017-02-13 21:34:23 UTC
You cannot make those simplifications. Then only those with a previously installed dmd2 will be able to use the port. It would upgrade but not be able to build from scratch.

You can work around this by downloading dmd2 from digitalmars.com, installing it and using it to build the port. That's hardly practical, negating the need for the port.

I'll update the port myself.
Comment 2 John Colvin 2017-02-14 00:58:27 UTC
(In reply to Cy Schubert from comment #1)
Did you read or test the patch?

Unless I made a mistake, it doesn't require a pre-installed dmd, the bootstrapping process is almost identical to how it was before. While I am a newcomer to FreeBSD and ports, I have a good understanding of the dmd build system.

I'm not sure if it's acceptable here to re-open a rejected bug report, but I think my patch is valid and should be considered.
Comment 3 Cy Schubert freebsd_committer freebsd_triage 2017-02-14 01:38:36 UTC
If it fails to use an already installed dmd2 it will download one froe digitalmars.com. We don't want ports dynamically downloading external packages in order to build our own. Read posix.mak. A good test is:

1. Remove the three patches.

2. pkg delete dmd2

3. make checksum.

4. Disconnect your computer from the internet. (This is important!)

4. make

The port will fail to fetch the previous release of dmd2 from digitalmars.com. This is why I constructed the port as it is.
Comment 4 Cy Schubert freebsd_committer freebsd_triage 2017-02-14 01:48:43 UTC
BTW, 2.073.0 is now in the ports tree. Portscout should have notified me of the update and all those between 2.071 and the current but I didn't receive any portscout emails lately; I usually don't let this port get out of date for too long. I've changed the closure code to "FIXED".
Comment 5 John Colvin 2017-02-14 02:38:39 UTC
(In reply to Cy Schubert from comment #3)
This is frustrating.

If you check posix.mak, you will see that the download only occurs if AUTO_BOOTSTRAP is set. As you can see in my patch I do not set AUTO_BOOTSTRAP.

The previous release is downloaded by the port makefile (not dmd's posix.mak), due to my addition of
MASTER_SITES=	http://ftp.digitalmars.com/
in Makefile.bootstrap
If you check distinfo in my patch you can see dmd.2.067.1.zip is still present there.

My bsd machine is a remote server so going offline isn't an option, but I'm pretty sure that if you ran the test you sent me you would find my patch succeeded.

I'm pleased that the port is now updated, but this has not been a good first experience of contributing to ports.
Comment 6 Cy Schubert freebsd_committer freebsd_triage 2017-02-14 06:27:38 UTC
I've decided to modernize the port using your patch. Modernizing the port and updating should be separate commits to the tree.

Ports should not overwrite .conf files. Use @sample instead.

Sorry about the confusion.
Comment 7 commit-hook freebsd_committer freebsd_triage 2017-02-14 06:28:22 UTC
A commit references this bug:

Author: cy
Date: Tue Feb 14 06:27:29 UTC 2017
New revision: 434066
URL: https://svnweb.freebsd.org/changeset/ports/434066

Log:
  Modernize dmd2:

  - Removal of three patches; call bootstrap directly.
  - Distinfo for bootstrap is now in its own distfile.
  - Make examples optional.
  - Use GH instead of distrubuted .zip file.
  - Fully implement options helpers.

  PR:		217076
  Submitted by:	John Colvin <john.loughran.colvin@gmail.com>

Changes:
  head/lang/dmd2/Makefile
  head/lang/dmd2/Makefile.bootstrap
  head/lang/dmd2/distinfo
  head/lang/dmd2/distinfo.bootstrap
  head/lang/dmd2/files/patch-freebsd__bin32__dmd.conf
  head/lang/dmd2/files/patch-freebsd__bin64__dmd.conf
  head/lang/dmd2/files/patch-src-druntime-posix.mak
  head/lang/dmd2/files/patch-src-phobos-posix.mak
  head/lang/dmd2/files/patch-src__dmd__posix.mak
  head/lang/dmd2/pkg-plist
Comment 8 Cy Schubert freebsd_committer freebsd_triage 2017-02-18 04:02:22 UTC
(In reply to John Colvin from comment #5)
I would like to apologize for dismissing your PR so quickly rather than 
work through any issues I may have had with with it and dismissing the patch so quickly. For that I am sorry. I hope you continue to contribute to FreeBSD.