From owner-freebsd-ports@freebsd.org Fri Jan 15 09:05:53 2021 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB2BC4DE36A for ; Fri, 15 Jan 2021 09:05:53 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DHFdr6rXVz4f3H for ; Fri, 15 Jan 2021 09:05:52 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mail-lf1-f53.google.com with SMTP id b26so12107964lff.9 for ; Fri, 15 Jan 2021 01:05:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LhRym3+7IxyBWETQkPW4MGLFCYs7CRg3Yj1Uh1GKKgc=; b=k93EojqzU+ZgUdw/r7qrYuU3MHiQud4RHjQAdrCJGXUWaGLMgaw36lu/MWatWqYEBT 1ictZt0NLjz/jLmUsuLDmFeVOpE17Vfpn1Pjrm3bj5FkIfNw6sDurJMDpMmLEpAovGC/ pTzYvcI/YksnkbUZJam78uf5v8r3goKFhkmLLgW31kWeWt8I2UfKHUC/J+fz0iU3evUQ djU0EL/qN42lqhw2/3yEUA6kea/YxV/PoLdYH26YktdSd+i1N9dP0ObZSihG0YXEoJmS WXa1dsU7PolQQz3/WuvbJIryL1M3ZXpkAUrfvBHN0Hrio3rRPAIWfkmbanKUg7bm7fcv 3Xzg== X-Gm-Message-State: AOAM532hRwWmwV55E7Xn2NjM2xtjkyxnf6Z0685zs0nzCarVaEe4Pm1A CoK1xEVUjTUHueqYgVfOxBkckvSv9O4daw== X-Google-Smtp-Source: ABdhPJwGSAiK+jEZ2k17kDSkzbJi2YDKu3MkwstiEZJwkVHyS2Xk74uLh3UVzYcy1DvdG1q5S1hjLg== X-Received: by 2002:a05:6512:68d:: with SMTP id t13mr3438814lfe.472.1610701550918; Fri, 15 Jan 2021 01:05:50 -0800 (PST) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com. [209.85.208.181]) by smtp.gmail.com with ESMTPSA id b15sm435069lfj.306.2021.01.15.01.05.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Jan 2021 01:05:50 -0800 (PST) Received: by mail-lj1-f181.google.com with SMTP id x23so9557845lji.7 for ; Fri, 15 Jan 2021 01:05:50 -0800 (PST) X-Received: by 2002:a2e:9153:: with SMTP id q19mr4730177ljg.173.1610701550548; Fri, 15 Jan 2021 01:05:50 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Gleb Popov Date: Fri, 15 Jan 2021 13:05:24 +0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: CMAKE_PREFIX_PATH and /usr/local To: Tomasz CEDRO Cc: freebsd-ports X-Rspamd-Queue-Id: 4DHFdr6rXVz4f3H X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of 6yearold@gmail.com designates 209.85.167.53 as permitted sender) smtp.mailfrom=6yearold@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.999]; RCPT_COUNT_TWO(0.00)[2]; FORGED_SENDER(0.30)[arrowd@freebsd.org,6yearold@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.167.53:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[arrowd@freebsd.org,6yearold@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; R_DKIM_NA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[209.85.167.53:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.53:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.53:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-ports] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 09:05:53 -0000 On Fri, Jan 15, 2021 at 12:50 AM Tomasz CEDRO wrote: > Hello world :-) > > I am porting LimeSuite to FreeBSD. Local patch fixes missing > "/usr/local/" path in CMakeLists.txt so the package now builds fine on > FreeBSD. On Linux probably most of the libraries and includes are > located in /usr/ do problem does not exist. > > Upstream has some objections to accept this patch and considers > "/usr/local" a non-standard path [1]. But they propose to use > CMAKE_PREFIX_PATH to add "/usr/local". This however does not seem to > be supported in Ports (yet?). > > The question is how to tell CMake about "/usr/local/include" without > source code modification? :-) > > Below is the proposed patch: > > > @@ -171,6 +171,11 @@ if (ENABLE_NEW_GAIN_BEHAVIOUR) > add_definitions(-DNEW_GAIN_BEHAVIOUR) > endif() > > +if (CMAKE_SYSTEM_NAME MATCHES "BSD") > + include_directories("/usr/local/include") > This is most certainly a wrong thing to do. Instead of simply adding -I/usr/local/include everywhere, you should fix problems for each dependency that the software requires. What error do you get without your patch?